# Generated by Django 3.1.5 on 2021-03-30 06:40

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('masterdata', '0001_initial'),
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='TraderSalesContract',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('contract_id', models.CharField(max_length=200)),
                ('manager', models.CharField(blank=True, max_length=200, null=True)),
                ('person_in_charge', models.CharField(max_length=200)),
                ('remarks', models.TextField(blank=True, null=True)),
                ('shipping_method', models.CharField(choices=[('D', 'Delivery'), ('R', 'Receipt'), ('C', 'ID Change'), ('B', '* Blank')], max_length=1)),
                ('shipping_date', models.DateField()),
                ('payment_method', models.CharField(choices=[('TR', 'Transfer'), ('CH', 'Check'), ('BL', 'Bill'), ('CA', 'Cash')], max_length=2)),
                ('payment_due_date', models.DateField()),
                ('insurance_fee', models.IntegerField()),
                ('updated_at', models.DateField()),
                ('created_at', models.DateField()),
                ('customer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='masterdata.customer')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='TraderPurchasesContract',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('contract_id', models.CharField(max_length=200)),
                ('manager', models.CharField(blank=True, max_length=200, null=True)),
                ('person_in_charge', models.CharField(max_length=200)),
                ('remarks', models.TextField(blank=True, null=True)),
                ('shipping_method', models.CharField(choices=[('D', 'Delivery'), ('R', 'Receipt'), ('C', 'ID Change'), ('B', '* Blank')], max_length=1)),
                ('shipping_date', models.DateField()),
                ('payment_method', models.CharField(choices=[('TR', 'Transfer'), ('CH', 'Check'), ('BL', 'Bill'), ('CA', 'Cash')], max_length=2)),
                ('payment_due_date', models.DateField()),
                ('insurance_fee', models.IntegerField()),
                ('updated_at', models.DateField()),
                ('created_at', models.DateField()),
                ('transfer_deadline', models.DateField()),
                ('bank_name', models.CharField(max_length=200)),
                ('account_number', models.CharField(max_length=200)),
                ('branch_name', models.CharField(max_length=200)),
                ('account_holder', models.CharField(max_length=200)),
                ('customer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='masterdata.customer')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SaleSender',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('P', 'Product'), ('D', 'Document')], max_length=1)),
                ('expected_arrival_date', models.DateField()),
                ('contract', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='senders', to='contracts.tradersalescontract')),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='masterdata.receiver')),
            ],
        ),
        migrations.CreateModel(
            name='PurchaseSender',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('P', 'Product'), ('D', 'Document')], max_length=1)),
                ('desired_arrival_date', models.DateField()),
                ('shipping_company', models.CharField(max_length=100)),
                ('remarks', models.TextField(blank=True, null=True)),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='masterdata.receiver')),
            ],
        ),
        migrations.CreateModel(
            name='Milestone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('amount', models.IntegerField()),
                ('object_id', models.PositiveIntegerField()),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
            ],
        ),
        migrations.CreateModel(
            name='HallSalesContract',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('contract_id', models.CharField(max_length=200)),
                ('remarks', models.TextField(blank=True, null=True)),
                ('insurance_fee_include', models.BooleanField(default=True)),
                ('insurance_fee', models.IntegerField()),
                ('shipping_date', models.DateField()),
                ('opening_date', models.DateField()),
                ('payment_method', models.CharField(choices=[('TR', 'Transfer'), ('CH', 'Check'), ('BL', 'Bill'), ('CA', 'Cash')], max_length=2)),
                ('transfer_account', models.CharField(max_length=255)),
                ('person_in_charge', models.CharField(max_length=200)),
                ('confirmor', models.CharField(max_length=200)),
                ('created_at', models.DateField()),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='masterdata.customer')),
                ('hall', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='masterdata.hall')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HallPurchasesContract',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('contract_id', models.CharField(max_length=200)),
                ('remarks', models.TextField(blank=True, null=True)),
                ('insurance_fee_include', models.BooleanField(default=True)),
                ('insurance_fee', models.IntegerField()),
                ('shipping_date', models.DateField()),
                ('opening_date', models.DateField()),
                ('payment_method', models.CharField(choices=[('TR', 'Transfer'), ('CH', 'Check'), ('BL', 'Bill'), ('CA', 'Cash')], max_length=2)),
                ('transfer_account', models.CharField(max_length=255)),
                ('person_in_charge', models.CharField(max_length=200)),
                ('confirmor', models.CharField(max_length=200)),
                ('created_at', models.DateField()),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='masterdata.customer')),
                ('hall', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='masterdata.hall')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ContractProduct',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('M', 'Main body'), ('F', 'Frame'), ('C', 'Cell'), ('N', 'Nail sheet')], max_length=1)),
                ('quantity', models.PositiveIntegerField()),
                ('price', models.PositiveIntegerField()),
                ('object_id', models.PositiveIntegerField()),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
                ('product', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='masterdata.product')),
            ],
        ),
        migrations.CreateModel(
            name='ContractDocumentFee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number_of_models', models.IntegerField()),
                ('number_of_units', models.IntegerField()),
                ('object_id', models.PositiveIntegerField()),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
                ('document_fee', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='masterdata.documentfee')),
            ],
        ),
        migrations.CreateModel(
            name='ContractDocument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.PositiveIntegerField()),
                ('price', models.PositiveIntegerField()),
                ('object_id', models.PositiveIntegerField()),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
                ('document', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='masterdata.document')),
            ],
        ),
    ]
