Compare commits
2 Commits
6a3ac097e8
...
0695e4757d
Author | SHA1 | Date |
---|---|---|
laoxiao | 0695e4757d | 2 years ago |
laoxiao | 833538959f | 2 years ago |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,162 @@
|
||||
# Generated by Django 3.2.16 on 2023-04-01 21:07
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='City',
|
||||
fields=[
|
||||
('id', models.IntegerField(primary_key=True, serialize=False)),
|
||||
('c_name', models.CharField(max_length=30, verbose_name='城市名称')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '城市表',
|
||||
'verbose_name_plural': '城市表',
|
||||
'db_table': 'city',
|
||||
'ordering': ['id'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CustomerModel',
|
||||
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, unique=True, verbose_name='客户名称')),
|
||||
('mobile', models.CharField(blank=True, max_length=11, null=True, verbose_name='手机号码')),
|
||||
('phone', models.CharField(blank=True, max_length=22, null=True, verbose_name='联系电话')),
|
||||
('contacts_name', models.CharField(blank=True, max_length=22, null=True, verbose_name='联系人名')),
|
||||
('email', models.CharField(blank=True, max_length=50, null=True, verbose_name='电子邮箱')),
|
||||
('ratepayer_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='纳税人识别号码')),
|
||||
('bank', models.CharField(blank=True, max_length=50, null=True, verbose_name='开户银行')),
|
||||
('account_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='银行账号')),
|
||||
('nation', models.CharField(blank=True, max_length=50, null=True, verbose_name='国家')),
|
||||
('province', models.CharField(blank=True, max_length=50, null=True, verbose_name='省份')),
|
||||
('city', models.CharField(blank=True, max_length=50, null=True, verbose_name='城市')),
|
||||
('address', models.CharField(blank=True, max_length=50, null=True, verbose_name='详细地址')),
|
||||
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
|
||||
('init_receivable', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True, verbose_name='初期应收')),
|
||||
('current_receivable', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True, verbose_name='末期应收')),
|
||||
('order_number', models.IntegerField(default=100, verbose_name='排序号码')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '客户',
|
||||
'verbose_name_plural': '客户',
|
||||
'db_table': 't_customer',
|
||||
'ordering': ['order_number', 'id'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Nation',
|
||||
fields=[
|
||||
('id', models.IntegerField(primary_key=True, serialize=False)),
|
||||
('n_name', models.CharField(max_length=30, verbose_name='国家名称')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '国家表',
|
||||
'verbose_name_plural': '国家表',
|
||||
'db_table': 'nation',
|
||||
'ordering': ['id'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Province',
|
||||
fields=[
|
||||
('id', models.IntegerField(primary_key=True, serialize=False)),
|
||||
('p_name', models.CharField(max_length=30, verbose_name='省份名称')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '省份表',
|
||||
'verbose_name_plural': '省份表',
|
||||
'db_table': 'province',
|
||||
'ordering': ['id'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SettlementAccountModel',
|
||||
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, unique=True, 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='备注')),
|
||||
('init_amount', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='初期金额')),
|
||||
('balance', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='余额')),
|
||||
('order_number', models.IntegerField(default=100, verbose_name='排序号码')),
|
||||
('is_default', models.BooleanField(default=False, verbose_name='是否默认')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '结算账户',
|
||||
'verbose_name_plural': '结算账户',
|
||||
'db_table': 't_settlement_account',
|
||||
'ordering': ['order_number', 'id'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SupplierModel',
|
||||
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, unique=True, verbose_name='供应商名称')),
|
||||
('mobile', models.CharField(blank=True, max_length=11, null=True, verbose_name='手机号码')),
|
||||
('phone', models.CharField(blank=True, max_length=22, null=True, verbose_name='联系电话')),
|
||||
('contacts_name', models.CharField(blank=True, max_length=22, null=True, verbose_name='联系人名')),
|
||||
('email', models.CharField(blank=True, max_length=50, null=True, verbose_name='电子邮箱')),
|
||||
('ratepayer_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='纳税人识别号码')),
|
||||
('bank', models.CharField(blank=True, max_length=50, null=True, verbose_name='开户银行')),
|
||||
('account_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='银行账号')),
|
||||
('nation', models.CharField(blank=True, max_length=50, null=True, verbose_name='国家')),
|
||||
('province', models.CharField(blank=True, max_length=50, null=True, verbose_name='省份')),
|
||||
('city', models.CharField(blank=True, max_length=50, null=True, verbose_name='城市')),
|
||||
('address', models.CharField(blank=True, max_length=50, null=True, verbose_name='详细地址')),
|
||||
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
|
||||
('init_pay', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=20, verbose_name='初期应付')),
|
||||
('current_pay', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=20, verbose_name='末期应付')),
|
||||
('order_number', models.IntegerField(default=100, verbose_name='排序号码')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '供应商',
|
||||
'verbose_name_plural': '供应商',
|
||||
'db_table': 't_supplier',
|
||||
'ordering': ['order_number', 'id'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='WarehouseModel',
|
||||
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, unique=True, verbose_name='仓库名称')),
|
||||
('nation', models.CharField(blank=True, max_length=50, null=True, verbose_name='国家')),
|
||||
('province', models.CharField(blank=True, max_length=50, null=True, verbose_name='省份')),
|
||||
('city', models.CharField(blank=True, max_length=50, null=True, verbose_name='城市')),
|
||||
('address', models.CharField(blank=True, max_length=50, null=True, verbose_name='详细地址')),
|
||||
('remark', models.CharField(blank=True, max_length=512, null=True, verbose_name='备注')),
|
||||
('warehouse_fee', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='仓储费用(元/天/KG)')),
|
||||
('truckage', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, verbose_name='搬运费用')),
|
||||
('order_number', models.IntegerField(default=100, verbose_name='排序号码')),
|
||||
('is_default', models.BooleanField(default=False, verbose_name='是否默认的仓库')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '仓库',
|
||||
'verbose_name_plural': '仓库',
|
||||
'db_table': 't_warehouse',
|
||||
'ordering': ['order_number', 'id'],
|
||||
},
|
||||
),
|
||||
]
|
@ -0,0 +1,33 @@
|
||||
# Generated by Django 3.2.16 on 2023-04-01 21:07
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('basic_info', '0001_initial'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='warehousemodel',
|
||||
name='leader_user',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='仓库负责人'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='province',
|
||||
name='nation',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='province_list', to='basic_info.nation', verbose_name='省份所在的国家'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='city',
|
||||
name='province',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='city_list', to='basic_info.province', verbose_name='城市所在的省份'),
|
||||
),
|
||||
]
|
@ -0,0 +1,123 @@
|
||||
# Generated by Django 3.2.16 on 2023-04-01 21:07
|
||||
|
||||
import django.contrib.auth.models
|
||||
import django.contrib.auth.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('auth', '0012_alter_user_first_name_max_length'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Menu',
|
||||
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='更新时间')),
|
||||
('number', models.IntegerField(blank=True, null=True, verbose_name='排序数字')),
|
||||
('url', models.CharField(blank=True, max_length=256, null=True, verbose_name='菜单访问的URL')),
|
||||
('name', models.CharField(max_length=50, verbose_name='菜单名字')),
|
||||
('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='erp_system.menu')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '功能菜单',
|
||||
'verbose_name_plural': '功能菜单',
|
||||
'db_table': 't_menu',
|
||||
'ordering': ['number'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='PermissionsModel',
|
||||
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=50, verbose_name='权限名')),
|
||||
('is_menu', models.BooleanField(default=True, verbose_name='是否为菜单')),
|
||||
('method', models.CharField(blank=True, choices=[('POST', '增'), ('DELETE', '删'), ('PUT', '改'), ('PATCH', '改局部'), ('GET', '查')], default='', max_length=8, verbose_name='请求方法')),
|
||||
('path', models.CharField(blank=True, default='', max_length=200, verbose_name='请求路径')),
|
||||
('desc', models.CharField(blank=True, default='', max_length=512, verbose_name='权限描述')),
|
||||
('menu', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='permissions_list', to='erp_system.menu')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '权限',
|
||||
'verbose_name_plural': '权限',
|
||||
'db_table': 't_permissions',
|
||||
'ordering': ['id'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='RolesModel',
|
||||
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=32, unique=True, verbose_name='角色名字')),
|
||||
('permissions', models.ManyToManyField(blank=True, db_table='t_roles_permissions', to='erp_system.PermissionsModel', verbose_name='权限')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '角色',
|
||||
'verbose_name_plural': '角色',
|
||||
'db_table': 't_roles',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DeptModel',
|
||||
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=32, unique=True, verbose_name='部门')),
|
||||
('address', models.CharField(blank=True, default='', max_length=128, verbose_name='部门地址')),
|
||||
('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='erp_system.deptmodel', verbose_name='父部门')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '部门',
|
||||
'verbose_name_plural': '部门',
|
||||
'db_table': 't_dept',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='UserModel',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('password', models.CharField(max_length=128, verbose_name='password')),
|
||||
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
|
||||
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
|
||||
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
|
||||
('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
|
||||
('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
|
||||
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
|
||||
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
|
||||
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
|
||||
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
|
||||
('phone', models.CharField(blank=True, max_length=11, null=True, unique=True, verbose_name='手机号码')),
|
||||
('real_name', models.CharField(blank=True, max_length=128, null=True, verbose_name='真实姓名')),
|
||||
('dept', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='erp_system.deptmodel', verbose_name='用户所在的部门')),
|
||||
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
|
||||
('roles', models.ManyToManyField(blank=True, db_table='t_users_roles', to='erp_system.RolesModel', verbose_name='用户所拥有的角色列表')),
|
||||
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '功能菜单',
|
||||
'verbose_name_plural': '功能菜单',
|
||||
'db_table': 't_user',
|
||||
'ordering': ['id'],
|
||||
},
|
||||
managers=[
|
||||
('objects', django.contrib.auth.models.UserManager()),
|
||||
],
|
||||
),
|
||||
]
|
@ -0,0 +1,121 @@
|
||||
# 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'],
|
||||
},
|
||||
),
|
||||
]
|
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class WarehouseInfoConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'warehouse_info'
|
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
Loading…
Reference in new issue