-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path0001_initial.py
78 lines (72 loc) · 3.73 KB
/
0001_initial.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Generated by Django 2.2.4 on 2022-04-14 06:28
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import identity.models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('courseApp', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='VerificationEmail',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('email', models.EmailField(max_length=254)),
('verification_code', models.CharField(max_length=10)),
],
),
migrations.CreateModel(
name='Person',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('token', models.CharField(blank=True, max_length=50, null=True, verbose_name='Token Auth')),
('username', models.CharField(blank=True, max_length=20, null=True)),
('user_icon', models.ImageField(blank=True, null=True, upload_to=identity.models.user_directory_path)),
('tags', models.CharField(blank=True, max_length=20, null=True)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'user_extended',
},
),
migrations.CreateModel(
name='Like',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('like_time', models.DateTimeField(auto_now=True)),
('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='identity.Person')),
('topic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courseApp.Topic')),
],
),
migrations.CreateModel(
name='History',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('last_practice_time', models.DateTimeField(verbose_name='上次练习时间')),
('course', models.ManyToManyField(to='courseApp.MyCourse', verbose_name='course_progress')),
('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='identity.Person')),
('topic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courseApp.Topic')),
],
),
migrations.CreateModel(
name='Collect',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('collect_time', models.DateTimeField(auto_now=True)),
('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='identity.Person')),
('topic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='courseApp.Topic')),
],
),
migrations.CreateModel(
name='Admin',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('token', models.CharField(blank=True, max_length=50, null=True, verbose_name='Token Auth')),
('admin_name', models.CharField(blank=True, max_length=20, null=True)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
]