# Generated by Django 3.2 on 2021-04-28 18:33

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('web', '0003_alter_sales_starting_date'),
    ]

    operations = [
        migrations.CreateModel(
            name='DeliveryOrder',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('delivery_order_date', models.DateField(verbose_name='Tanggal Kirim')),
                ('added_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='delivery_orders', to=settings.AUTH_USER_MODEL)),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='delivery_orders', to='web.customer')),
                ('sales', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='delivery_orders', to='web.sales')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Products',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Nama Produk')),
                ('quantity', models.PositiveIntegerField()),
                ('metric_type', models.CharField(max_length=200, verbose_name='Ukuran')),
                ('unit_quantity', models.PositiveIntegerField(blank=True, null=True)),
                ('delivery_order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='products', to='web.deliveryorder')),
            ],
        ),
    ]
