# Generated by Django 2.2 on 2020-11-03 17:55

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


class Migration(migrations.Migration):

    dependencies = [
        ('inventory_data', '0023_tipe_quantity'),
    ]

    operations = [
        migrations.CreateModel(
            name='Buyer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('buyer', models.CharField(max_length=140, null=True, unique=True, verbose_name='Pembeli Barang')),
            ],
            options={
                'verbose_name_plural': 'Pembeli Barang',
            },
        ),
        migrations.CreateModel(
            name='ReceivedStock',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipe', models.CharField(max_length=140, null=True, unique=True, verbose_name='Tipe Barang')),
                ('qty_in', models.PositiveIntegerField(default=1, verbose_name='Jumlah Masuk')),
                ('date_in', models.DateField(default=django.utils.timezone.now, null=True)),
                ('brand', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='inventory_data.Brand', verbose_name='Nama Brand')),
            ],
            options={
                'verbose_name_plural': 'Received Stock',
            },
        ),
        migrations.CreateModel(
            name='SellOut',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tipe', models.CharField(max_length=140, null=True, unique=True, verbose_name='Tipe Barang')),
                ('sell_qty', models.PositiveIntegerField(default=1, verbose_name='Jumlah Terjual')),
                ('selling_date', models.DateField(default=django.utils.timezone.now, null=True)),
                ('brand', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='inventory_data.Brand', verbose_name='Nama Brand')),
                ('buyer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='inventory_data.Buyer', verbose_name='Pembeli')),
            ],
            options={
                'verbose_name_plural': 'Sell Stock',
            },
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('supplier', models.CharField(max_length=140, null=True, unique=True, verbose_name='Supplier')),
            ],
            options={
                'verbose_name_plural': 'Supplier Barang Masuk',
            },
        ),
        migrations.RemoveField(
            model_name='stockout',
            name='stock_out',
        ),
        migrations.RemoveField(
            model_name='tipe',
            name='brand',
        ),
        migrations.DeleteModel(
            name='StockIn',
        ),
        migrations.DeleteModel(
            name='StockOut',
        ),
        migrations.DeleteModel(
            name='Tipe',
        ),
        migrations.AddField(
            model_name='receivedstock',
            name='supplier',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='inventory_data.Supplier', verbose_name='Supplier'),
        ),
    ]
