parent
5f7c949e9b
commit
aac62e2ac7
@ -0,0 +1,25 @@
|
|||||||
|
# Generated by Django 2.1 on 2023-09-06 14:02
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Admin',
|
||||||
|
fields=[
|
||||||
|
('username', models.CharField(max_length=32, primary_key=True, serialize=False, verbose_name='管理员账号')),
|
||||||
|
('password', models.CharField(max_length=128, verbose_name='管理员密码')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': '管理员',
|
||||||
|
'db_table': 'Eduadmin',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
@ -0,0 +1,32 @@
|
|||||||
|
# Generated by Django 2.1 on 2023-09-06 14:01
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Student',
|
||||||
|
fields=[
|
||||||
|
('sid', models.IntegerField(primary_key=True, serialize=False, verbose_name='学生编号')),
|
||||||
|
('s_username', models.CharField(max_length=30, verbose_name='用户名称')),
|
||||||
|
('s_password', models.CharField(max_length=100, verbose_name='密码')),
|
||||||
|
('s_name', models.CharField(max_length=100, verbose_name='姓名')),
|
||||||
|
('s_sex', models.CharField(max_length=4, verbose_name='性别')),
|
||||||
|
('s_grade', models.IntegerField(verbose_name='年级')),
|
||||||
|
('s_class_name', models.CharField(max_length=50, verbose_name='班级')),
|
||||||
|
('s_major', models.CharField(max_length=50, verbose_name='专业名称')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': '学生',
|
||||||
|
'verbose_name_plural': '学生',
|
||||||
|
'db_table': 'student',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
@ -0,0 +1,51 @@
|
|||||||
|
# Generated by Django 2.1 on 2023-09-06 14:01
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('Student', '0001_initial'),
|
||||||
|
('teacher', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Course',
|
||||||
|
fields=[
|
||||||
|
('cid', models.AutoField(primary_key=True, serialize=False, verbose_name='课程编号')),
|
||||||
|
('c_name', models.CharField(max_length=255, verbose_name='课程名称')),
|
||||||
|
('c_type', models.CharField(max_length=128, verbose_name='课程类型')),
|
||||||
|
('credit', models.IntegerField(verbose_name='课程学分')),
|
||||||
|
('tid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='teacher.Teacher')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': '课程',
|
||||||
|
'verbose_name_plural': '课程',
|
||||||
|
'db_table': 'course',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='SC',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('middle_grade', models.IntegerField()),
|
||||||
|
('end_grade', models.IntegerField()),
|
||||||
|
('cid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='course.Course')),
|
||||||
|
('sid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Student.Student')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': '管理员',
|
||||||
|
'verbose_name_plural': '管理员',
|
||||||
|
'db_table': 'sc',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name='sc',
|
||||||
|
unique_together={('sid', 'cid')},
|
||||||
|
),
|
||||||
|
]
|
@ -0,0 +1,30 @@
|
|||||||
|
# Generated by Django 2.1 on 2023-09-06 14:01
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Teacher',
|
||||||
|
fields=[
|
||||||
|
('tid', models.AutoField(primary_key=True, serialize=False, verbose_name='教师编号')),
|
||||||
|
('t_name', models.CharField(max_length=255, verbose_name='教师名称')),
|
||||||
|
('t_sex', models.CharField(max_length=128, verbose_name='教师性别')),
|
||||||
|
('t_title', models.CharField(max_length=128, verbose_name='教师职称')),
|
||||||
|
('t_education', models.CharField(max_length=128, verbose_name='教师学历')),
|
||||||
|
('t_dept', models.CharField(max_length=128, verbose_name='教师所属院系')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name': '教师',
|
||||||
|
'verbose_name_plural': '教师',
|
||||||
|
'db_table': 'teacher',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
Loading…
Reference in new issue