# Generated by Django 3.2.16 on 2023-04-01 21:07 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('basic_info', '0001_initial'), ] operations = [ migrations.CreateModel( name='AttachmentModel', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('delete_flag', models.CharField(default='0', help_text='是否启用', max_length=1, verbose_name='是否启用')), ('create_time', models.DateTimeField(auto_now_add=True, help_text='创建时间', verbose_name='创建时间')), ('update_time', models.DateTimeField(auto_now=True, help_text='更新时间', verbose_name='更新时间')), ('a_file', models.FileField(upload_to='', verbose_name='附件或者图片')), ('a_type', models.CharField(blank=True, choices=[('image', '图片'), ('doc', 'Word文档'), ('excel', 'Excel文档'), ('zip', '压缩文件'), ('other', '其他文件')], max_length=20, null=True, verbose_name='附件的类型')), ], options={ 'verbose_name': '附件表', 'verbose_name_plural': '附件表', 'db_table': 't_attachment', 'ordering': ['id'], }, ), migrations.CreateModel( name='GoodsCategoryModel', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('delete_flag', models.CharField(default='0', help_text='是否启用', max_length=1, verbose_name='是否启用')), ('create_time', models.DateTimeField(auto_now_add=True, help_text='创建时间', verbose_name='创建时间')), ('update_time', models.DateTimeField(auto_now=True, help_text='更新时间', verbose_name='更新时间')), ('name', models.CharField(max_length=100, verbose_name='类别名称')), ('number_code', models.CharField(max_length=28, unique=True, verbose_name='编号')), ('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')), ('order_number', models.IntegerField(default=100, verbose_name='排序号码')), ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to='goods_info.goodscategorymodel')), ], options={ 'verbose_name': '商品类别', 'verbose_name_plural': '商品类别', 'db_table': 't_category', 'ordering': ['order_number', 'id'], }, ), migrations.CreateModel( name='UnitsModel', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('delete_flag', models.CharField(default='0', help_text='是否启用', max_length=1, verbose_name='是否启用')), ('create_time', models.DateTimeField(auto_now_add=True, help_text='创建时间', verbose_name='创建时间')), ('update_time', models.DateTimeField(auto_now=True, help_text='更新时间', verbose_name='更新时间')), ('basic_name', models.CharField(max_length=20, unique=True, verbose_name='基本单位')), ('backup_name', models.CharField(blank=True, max_length=20, null=True, verbose_name='副单位')), ('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')), ], options={ 'verbose_name': '计量单位', 'verbose_name_plural': '计量单位', 'db_table': 't_units', 'ordering': ['id'], }, ), migrations.CreateModel( name='GoodsModel', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('delete_flag', models.CharField(default='0', help_text='是否启用', max_length=1, verbose_name='是否启用')), ('create_time', models.DateTimeField(auto_now_add=True, help_text='创建时间', verbose_name='创建时间')), ('update_time', models.DateTimeField(auto_now=True, help_text='更新时间', verbose_name='更新时间')), ('name', models.CharField(max_length=20, unique=True, verbose_name='货品名称')), ('specification', models.CharField(blank=True, max_length=50, null=True, verbose_name='规格')), ('model_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='型号')), ('color', models.CharField(blank=True, max_length=50, null=True, verbose_name='颜色')), ('basic_weight', models.CharField(blank=True, max_length=50, null=True, verbose_name='基础重量')), ('expiration_day', models.IntegerField(blank=True, null=True, verbose_name='保质期')), ('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')), ('number_code', models.CharField(max_length=28, unique=True, verbose_name='编号或者批号')), ('purchase_price', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, verbose_name='采购价')), ('retail_price', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, verbose_name='零售价')), ('sales_price', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, verbose_name='销售价')), ('lowest_price', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, verbose_name='最低售价')), ('order_number', models.IntegerField(default=100, verbose_name='排序号码')), ('images_list', models.CharField(blank=True, max_length=20, null=True, verbose_name='商品附件所对应的id列表')), ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.goodscategorymodel')), ('units', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='goods_info.unitsmodel')), ], options={ 'verbose_name': '货品表', 'verbose_name_plural': '货品表', 'db_table': 't_goods', 'ordering': ['order_number', 'id'], }, ), migrations.CreateModel( name='GoodsInventoryModel', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('init_inventory', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='期初库存数量')), ('cur_inventory', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='现在库存数量')), ('lowest_inventory', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='最低安全库存, 0表示不设置')), ('highest_inventory', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='最高安全库存,0表示不设置')), ('warehouse_name', models.CharField(max_length=50, verbose_name='仓库的名称')), ('goods', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='inventory_list', to='goods_info.goodsmodel')), ('warehouse', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='basic_info.warehousemodel')), ], options={ 'verbose_name': '货品库存表', 'verbose_name_plural': '货品库存表', 'db_table': 't_goods_inventory', 'ordering': ['id'], }, ), ]