# Generated by Django 3.0.9 on 2020-08-29 07:52

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


class Migration(migrations.Migration):

    dependencies = [
        ('warehouse', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Donvi',
            fields=[
                ('ten_dv', models.CharField(max_length=100, primary_key=True, serialize=False, verbose_name='Tên đơn vị')),
            ],
        ),
        migrations.CreateModel(
            name='Nguoiban',
            fields=[
                ('ten_nb', models.CharField(max_length=100, verbose_name='Tên người bán')),
                ('sdt_nb', phonenumber_field.modelfields.PhoneNumberField(max_length=128, primary_key=True, region=None, serialize=False, verbose_name='SDT')),
                ('email_nb', models.EmailField(blank=True, max_length=254, null=True, verbose_name='Email')),
                ('dia_chi_nb', models.TextField(blank=True, max_length=200, null=True, verbose_name='Địa chỉ')),
                ('ngay_hoptac', models.DateTimeField(auto_now_add=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Nhan',
            fields=[
                ('ten_nhan', models.CharField(max_length=200, primary_key=True, serialize=False, verbose_name='Tên nhãn')),
            ],
        ),
        migrations.CreateModel(
            name='NhapKho',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('so_luong', models.IntegerField(default=1, verbose_name='Số lượng')),
                ('gia_nhap', models.FloatField(default=19.99, null=True, verbose_name='Giá nhập')),
                ('ghi_chu', models.TextField(null=True, verbose_name='Ghi chú')),
                ('ngay_nhap', models.DateTimeField(auto_now_add=True, null=True)),
                ('don_vi_tinh', models.ManyToManyField(to='warehouse.Donvi', verbose_name='Đơn vị tính')),
                ('mua_tu', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='warehouse.Nguoiban', verbose_name='Mua từ')),
            ],
        ),
        migrations.CreateModel(
            name='Sanpham',
            fields=[
                ('ten_sp', models.CharField(default='Yến Sào', max_length=200, primary_key=True, serialize=False, verbose_name='Tên sản phẩm')),
                ('mo_ta', models.TextField(blank=True, null=True, verbose_name='Mô tả')),
                ('nhan', models.ManyToManyField(to='warehouse.Nhan', verbose_name='Nhãn')),
            ],
        ),
        migrations.DeleteModel(
            name='Product',
        ),
        migrations.DeleteModel(
            name='Tag',
        ),
        migrations.AddField(
            model_name='nhapkho',
            name='san_pham',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='warehouse.Sanpham', verbose_name='Tên sản phẩm'),
        ),
    ]
