1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- # Generated by Django 3.2 on 2021-07-17 20:05
- from django.db import migrations, models
- class Migration(migrations.Migration):
- initial = True
- dependencies = [
- ]
- operations = [
- migrations.CreateModel(
- name='Permission',
- fields=[
- ('id', models.CharField(default='TestLaboratory_V1_Permission_1', max_length=50, primary_key=True, serialize=False, unique=True, verbose_name='权限ID')),
- ('name', models.CharField(max_length=25, verbose_name='权限名')),
- ('url', models.URLField(blank=True, max_length=125, null=True, verbose_name='URL')),
- ('method', models.CharField(max_length=20, null=True, verbose_name='方法')),
- ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
- ('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
- ('delete', models.BooleanField(default=False)),
- ],
- options={
- 'verbose_name': '权限',
- 'verbose_name_plural': '权限',
- 'db_table': 'permission',
- },
- ),
- migrations.CreateModel(
- name='Role',
- fields=[
- ('id', models.CharField(default='TestLaboratory_V1_Role_1', max_length=50, primary_key=True, serialize=False, unique=True, verbose_name='角色ID')),
- ('name', models.CharField(max_length=25, unique=True, verbose_name='角色名')),
- ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
- ('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
- ('delete', models.BooleanField(default=False)),
- ('permissions', models.ManyToManyField(blank=True, to='user.Permission', verbose_name='权限信息')),
- ],
- options={
- 'verbose_name': '角色',
- 'verbose_name_plural': '角色',
- 'db_table': 'role',
- },
- ),
- migrations.CreateModel(
- name='User',
- fields=[
- ('id', models.CharField(default='TestLaboratory_V1_User_1', max_length=50, primary_key=True, serialize=False, unique=True, verbose_name='用户编号')),
- ('username', models.CharField(max_length=30, unique=True, verbose_name='用户名')),
- ('name', models.CharField(max_length=20, verbose_name='姓名')),
- ('password', models.CharField(default='123456', max_length=60, verbose_name='密码')),
- ('tel', models.CharField(max_length=20, verbose_name='联系方式')),
- ('identify', models.IntegerField(verbose_name='身份信息')),
- ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
- ('update_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
- ('is_login', models.BooleanField(default=False)),
- ('delete', models.BooleanField(default=False)),
- ('roles', models.ManyToManyField(blank=True, to='user.Role', verbose_name='角色信息')),
- ],
- options={
- 'verbose_name': '用户',
- 'verbose_name_plural': '用户',
- 'db_table': 'user',
- },
- ),
- ]
|