You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

77 lines
3.8 KiB

# Generated by Django 4.2.3 on 2023-07-07 06:50
from django.db import migrations, models
import django.db.models.deletion
import orm_demo.models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='BaseUserInfo',
fields=[
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='编号')),
('username', models.CharField(max_length=30, verbose_name='用户名')),
('password', models.CharField(max_length=20, verbose_name='密码')),
('status', models.CharField(max_length=1, verbose_name='状态')),
('create_date', models.DateField(auto_now_add=True, db_column='createDate', verbose_name='创建日期')),
],
options={
'db_table': 'orm_user_base_info',
'db_table_comment': '人员基本信息',
},
),
migrations.CreateModel(
name='DepartInfo',
fields=[
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='部门编号')),
('depart_name', models.CharField(max_length=30, verbose_name='部门名称')),
('create_date', models.DateField(auto_now_add=True, db_column='createDate', verbose_name='创建日期')),
],
options={
'db_table': 'orm_depart_info',
'db_table_comment': '部门信息',
},
),
migrations.CreateModel(
name='UserExtendInfo',
fields=[
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='扩展编号')),
('username', models.CharField(max_length=30, verbose_name='用户名')),
('true_name', models.CharField(max_length=30, verbose_name='真实姓名')),
('sex', models.IntegerField(verbose_name='性别')),
('age', models.IntegerField(validators=[orm_demo.models.age_validator], verbose_name='年龄')),
('department', models.CharField(max_length=20, verbose_name='部门')),
('salary', models.DecimalField(decimal_places=2, max_digits=8, verbose_name='薪水')),
('status', models.CharField(db_comment='1 有效, 0 无效', max_length=1, verbose_name='状态')),
('create_date', models.DateField(auto_now_add=True, db_column='createDate', verbose_name='创建日期')),
('last_update_time', models.DateTimeField(auto_now=True, db_column='lastUpdateTime', verbose_name='最后更新时间')),
('memo', models.TextField(blank=True, null=True, verbose_name='备注')),
('depart', models.ForeignKey(default='', on_delete=django.db.models.deletion.DO_NOTHING, to='orm_demo.departinfo')),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='orm_demo.baseuserinfo')),
],
options={
'db_table': 'orm_user_extend_info',
'db_table_comment': '人员扩展信息',
},
),
migrations.CreateModel(
name='SkillInfo',
fields=[
('id', models.AutoField(primary_key=True, serialize=False, verbose_name='技能编码')),
('skill_name', models.CharField(max_length=30, verbose_name='特长')),
('create_date', models.DateField(auto_now_add=True, db_column='createDate', verbose_name='创建时间')),
('user', models.ManyToManyField(db_table='orm_user_skill', to='orm_demo.userextendinfo')),
],
options={
'db_table': 'orm_skill_info',
'db_table_comment': '技能信息',
},
),
]