-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.py
195 lines (172 loc) · 3.02 KB
/
sample.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
''' Create sample data '''
''' Only run for the first time '''
from api import db, User, Student, Teacher
db.create_all()
db.session.add(User(
'Magnus Carlsen',
'carlsen@gmail.com',
'carlsen',
'1234',
'Admin'
))
db.session.add(User(
'Veselin Topalov',
'topalov@gmail.com',
'topalov',
'10001',
'Member'
))
db.session.add(User(
'Levon Aronian',
'aronian@gmail.com',
'aronian',
'12345',
'Admin'
))
db.session.add(User(
'Vladimir Kramnik',
'kramnik@gmail.com',
'kramnik',
'123456',
'Member'
))
db.session.add(User(
'Anish Giri',
'giri@gmail.com',
'giri',
'1234567',
'Member'
))
db.session.commit()
db.session.add(Student(
'Magnus Carlsen',
'carlsen_temp@gmail.com',
'04343634',
'Best chess player in the world. No need to explain',
32523,
'Norway Chess School',
'Elite',
1,
'182 Luong The Vinh, Thanh Xuan, Ha Noi',
'Math',
'default1.jpg'
))
db.session.add(Student(
'Giri Dad',
'giridad@gmail.com',
'0433243634',
'Best chess player in the world. No need to explain',
32523,
'Netherland Chess School',
'Medium',
5,
'144 Xuan Thuy, Cau Giay, Ha Noi',
'Math',
'default1.jpg'
))
db.session.add(Student(
'Carlsen bro',
'carlsen_temp_2@gmail.com',
'04343634',
'Best chess player in the world. No need to explain',
300,
'Norway Chess School',
'Beginner',
1,
'Dai hoc Bach Khoa Ha Noi',
'Math',
'default1.jpg'
))
db.session.add(Student(
'Topalov son 2',
'topalov_son_2@gmail.com',
'04343634wtewe',
'Brother of Best chess player in the world. No need to explain',
200,
'Bulgary Chess School',
'Normal',
2,
'16A Ly Nam De, Ha Noi',
'Math',
'default1.jpg'
))
db.session.add(Student(
'Topalov son 1',
'topalov_son_1@gmail.com',
'043423523634',
'Second Best chess player in the world. No need to explain',
12433,
'Bulgary Chess School',
'Elite',
2,
'Ho Chi Minh City',
'Math',
'default1.jpg'
))
db.session.commit()
db.session.add(Teacher(
'Magnus Carlsen',
'carlsen1@gmail.com',
'3252364',
'Best teacher in the world. no need to argue',
123,
'worker',
'Norway ambassador',
'elite',
1,
'43 Nguyen Chi Thanh, Hanoi',
'Math'
))
db.session.add(Teacher(
'Magnus Carlsen',
'carlsen2@gmail.com',
'3252364',
'Best teacher in the world. no need to argue. teach beginner also',
1236,
'worker',
'Norway ambassador',
'beginner',
1,
'47 Nguyen Chi Thanh, Hanoi',
'Math'
))
db.session.add(Teacher(
'Ruslan Ponomariov',
'ponomariov@gmail.com',
'32523623524',
'Ukraina. country of chess',
12334,
'student',
'University of Engineering and Technology',
'expert',
2,
'Sapa, Lao Cai',
'Math'
))
db.session.add(Teacher(
'Alexander Grischuk',
'grischuk@gmail.com',
'3252364343',
'Best russian teacher in the world. no need to argue',
123,
'student',
'University of Science and Technology',
'medium',
5,
'Manchester, England',
'Math'
))
db.session.add(Teacher(
'Peter Svidler',
'svilder@gmail.com',
'323463252364',
'want to have a lesson? call me maybe',
1232,
'student',
'Chu Van An high school',
'beginner',
2,
'43 Nguyen Chi Thanh, Hanoi',
'Math'
))
db.session.commit()