1
- # Generated by Django 4.1.2 on 2022-11-07 01:42
1
+ # Generated by Django 4.1.2 on 2023-04-25 13:51
2
2
3
3
import django .core .validators
4
4
from django .db import migrations , models
@@ -9,233 +9,116 @@ class Migration(migrations.Migration):
9
9
10
10
initial = True
11
11
12
- dependencies = []
12
+ dependencies = [
13
+ ]
13
14
14
15
operations = [
15
16
migrations .CreateModel (
16
- name = " CourseCategory" ,
17
+ name = ' CourseCategory' ,
17
18
fields = [
18
- (
19
- "id" ,
20
- models .BigAutoField (
21
- auto_created = True ,
22
- primary_key = True ,
23
- serialize = False ,
24
- verbose_name = "ID" ,
25
- ),
26
- ),
27
- ("created_at" , models .DateTimeField (auto_now_add = True )),
28
- ("updated_at" , models .DateTimeField (auto_now = True )),
29
- ("name" , models .CharField (max_length = 255 )),
30
- ("slug" , models .SlugField (unique = True )),
31
- ("photo" , models .ImageField (upload_to = "icons/" )),
19
+ ('id' , models .BigAutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
20
+ ('created_at' , models .DateTimeField (auto_now_add = True )),
21
+ ('updated_at' , models .DateTimeField (auto_now = True )),
22
+ ('name' , models .CharField (max_length = 255 )),
23
+ ('slug' , models .SlugField (unique = True )),
24
+ ('photo' , models .ImageField (upload_to = 'icons/' )),
32
25
],
33
26
options = {
34
- " db_table" : " categories" ,
27
+ ' db_table' : ' categories' ,
35
28
},
36
29
),
37
30
migrations .CreateModel (
38
- name = " CourseComplain" ,
31
+ name = ' CourseComplain' ,
39
32
fields = [
40
- (
41
- "id" ,
42
- models .BigAutoField (
43
- auto_created = True ,
44
- primary_key = True ,
45
- serialize = False ,
46
- verbose_name = "ID" ,
47
- ),
48
- ),
49
- ("created_at" , models .DateTimeField (auto_now_add = True )),
50
- ("updated_at" , models .DateTimeField (auto_now = True )),
51
- ("first_name" , models .CharField (max_length = 255 )),
52
- ("phone_number" , models .CharField (max_length = 25 )),
53
- ("description" , models .CharField (max_length = 522 )),
33
+ ('id' , models .BigAutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
34
+ ('created_at' , models .DateTimeField (auto_now_add = True )),
35
+ ('updated_at' , models .DateTimeField (auto_now = True )),
36
+ ('first_name' , models .CharField (max_length = 255 )),
37
+ ('phone_number' , models .CharField (max_length = 25 )),
38
+ ('description' , models .CharField (max_length = 522 )),
54
39
],
55
40
options = {
56
- " db_table" : " complains" ,
41
+ ' db_table' : ' complains' ,
57
42
},
58
43
),
59
44
migrations .CreateModel (
60
- name = " CourseNew" ,
45
+ name = ' CourseNew' ,
61
46
fields = [
62
- (
63
- "id" ,
64
- models .BigAutoField (
65
- auto_created = True ,
66
- primary_key = True ,
67
- serialize = False ,
68
- verbose_name = "ID" ,
69
- ),
70
- ),
71
- ("created_at" , models .DateTimeField (auto_now_add = True )),
72
- ("updated_at" , models .DateTimeField (auto_now = True )),
73
- ("image" , models .ImageField (upload_to = "icons/" )),
74
- ("title" , models .CharField (max_length = 255 )),
75
- ("description" , models .CharField (max_length = 522 )),
47
+ ('id' , models .BigAutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
48
+ ('created_at' , models .DateTimeField (auto_now_add = True )),
49
+ ('updated_at' , models .DateTimeField (auto_now = True )),
50
+ ('image' , models .ImageField (upload_to = 'icons/' )),
51
+ ('title' , models .CharField (max_length = 255 )),
52
+ ('description' , models .CharField (max_length = 522 )),
76
53
],
77
54
options = {
78
- " db_table" : " news" ,
55
+ ' db_table' : ' news' ,
79
56
},
80
57
),
81
58
migrations .CreateModel (
82
- name = " Teacher" ,
59
+ name = ' Teacher' ,
83
60
fields = [
84
- (
85
- "id" ,
86
- models .BigAutoField (
87
- auto_created = True ,
88
- primary_key = True ,
89
- serialize = False ,
90
- verbose_name = "ID" ,
91
- ),
92
- ),
93
- ("created_at" , models .DateTimeField (auto_now_add = True )),
94
- ("updated_at" , models .DateTimeField (auto_now = True )),
95
- ("full_name" , models .CharField (max_length = 255 )),
96
- ("image" , models .ImageField (upload_to = "icons/" )),
97
- (
98
- "rating" ,
99
- models .FloatField (
100
- validators = [
101
- django .core .validators .MaxValueValidator (5 , "Should be 5" ),
102
- django .core .validators .MinValueValidator (1 , "Should be 1" ),
103
- ]
104
- ),
105
- ),
106
- ("description" , models .CharField (max_length = 522 )),
107
- ("url_video" , models .CharField (max_length = 255 )),
108
- (
109
- "direction" ,
110
- models .ForeignKey (
111
- on_delete = django .db .models .deletion .CASCADE ,
112
- to = "user.coursecategory" ,
113
- ),
114
- ),
61
+ ('id' , models .BigAutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
62
+ ('created_at' , models .DateTimeField (auto_now_add = True )),
63
+ ('updated_at' , models .DateTimeField (auto_now = True )),
64
+ ('full_name' , models .CharField (max_length = 255 )),
65
+ ('image' , models .ImageField (upload_to = 'icons/' )),
66
+ ('rating' , models .FloatField (validators = [django .core .validators .MaxValueValidator (5 , 'Should be 5' ), django .core .validators .MinValueValidator (1 , 'Should be 1' )])),
67
+ ('description' , models .CharField (max_length = 522 )),
68
+ ('url_video' , models .URLField ()),
69
+ ('direction' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'user.coursecategory' )),
115
70
],
116
71
options = {
117
- " db_table" : " teachers" ,
72
+ ' db_table' : ' teachers' ,
118
73
},
119
74
),
120
75
migrations .CreateModel (
121
- name = " Student" ,
76
+ name = ' Student' ,
122
77
fields = [
123
- (
124
- "id" ,
125
- models .BigAutoField (
126
- auto_created = True ,
127
- primary_key = True ,
128
- serialize = False ,
129
- verbose_name = "ID" ,
130
- ),
131
- ),
132
- ("created_at" , models .DateTimeField (auto_now_add = True )),
133
- ("updated_at" , models .DateTimeField (auto_now = True )),
134
- ("full_name" , models .CharField (max_length = 255 )),
135
- ("image" , models .ImageField (upload_to = "icons/" )),
136
- ("description" , models .CharField (max_length = 522 )),
137
- (
138
- "course" ,
139
- models .ForeignKey (
140
- on_delete = django .db .models .deletion .CASCADE ,
141
- to = "user.coursecategory" ,
142
- ),
143
- ),
144
- (
145
- "teacher" ,
146
- models .ForeignKey (
147
- on_delete = django .db .models .deletion .CASCADE , to = "user.teacher"
148
- ),
149
- ),
78
+ ('id' , models .BigAutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
79
+ ('created_at' , models .DateTimeField (auto_now_add = True )),
80
+ ('updated_at' , models .DateTimeField (auto_now = True )),
81
+ ('full_name' , models .CharField (max_length = 255 )),
82
+ ('image' , models .ImageField (upload_to = 'icons/' )),
83
+ ('description' , models .CharField (max_length = 522 )),
84
+ ('course' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'user.coursecategory' )),
85
+ ('teacher' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'user.teacher' )),
150
86
],
151
87
options = {
152
- " db_table" : " students" ,
88
+ ' db_table' : ' students' ,
153
89
},
154
90
),
155
91
migrations .CreateModel (
156
- name = " Customer" ,
92
+ name = ' Customer' ,
157
93
fields = [
158
- (
159
- "id" ,
160
- models .BigAutoField (
161
- auto_created = True ,
162
- primary_key = True ,
163
- serialize = False ,
164
- verbose_name = "ID" ,
165
- ),
166
- ),
167
- ("created_at" , models .DateTimeField (auto_now_add = True )),
168
- ("updated_at" , models .DateTimeField (auto_now = True )),
169
- ("first_name" , models .CharField (max_length = 255 )),
170
- ("phone_number" , models .CharField (max_length = 25 )),
171
- (
172
- "status" ,
173
- models .CharField (
174
- choices = [
175
- ("Kutilyapti" , "Inactive" ),
176
- ("Qabul qilindi" , "Active" ),
177
- ("Qabdul qilinmadi" , "Reject" ),
178
- ("Keyinroqqa qo'yildi" , "Postponed" ),
179
- ],
180
- default = "Kutilyapti" ,
181
- max_length = 25 ,
182
- ),
183
- ),
184
- (
185
- "course" ,
186
- models .ForeignKey (
187
- on_delete = django .db .models .deletion .CASCADE ,
188
- to = "user.coursecategory" ,
189
- ),
190
- ),
94
+ ('id' , models .BigAutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
95
+ ('created_at' , models .DateTimeField (auto_now_add = True )),
96
+ ('updated_at' , models .DateTimeField (auto_now = True )),
97
+ ('first_name' , models .CharField (max_length = 255 )),
98
+ ('phone_number' , models .CharField (max_length = 25 )),
99
+ ('status' , models .CharField (choices = [('Kutilyapti' , 'Inactive' ), ('Qabul qilindi' , 'Active' ), ('Qabul qilinmadi' , 'Reject' ), ("Keyinroqqa qo'yildi" , 'Postponed' )], default = 'Kutilyapti' , max_length = 25 )),
100
+ ('course' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'user.coursecategory' )),
191
101
],
192
102
options = {
193
- " db_table" : " customers" ,
103
+ ' db_table' : ' customers' ,
194
104
},
195
105
),
196
106
migrations .CreateModel (
197
- name = " Course" ,
107
+ name = ' Course' ,
198
108
fields = [
199
- (
200
- "id" ,
201
- models .BigAutoField (
202
- auto_created = True ,
203
- primary_key = True ,
204
- serialize = False ,
205
- verbose_name = "ID" ,
206
- ),
207
- ),
208
- ("created_at" , models .DateTimeField (auto_now_add = True )),
209
- ("updated_at" , models .DateTimeField (auto_now = True )),
210
- ("image" , models .ImageField (upload_to = "icons/" )),
211
- ("title" , models .CharField (max_length = 255 )),
212
- ("duration" , models .IntegerField ()),
213
- (
214
- "rating" ,
215
- models .FloatField (
216
- validators = [
217
- django .core .validators .MaxValueValidator (5 , "Should be 5" ),
218
- django .core .validators .MinValueValidator (1 , "Should be 1" ),
219
- ]
220
- ),
221
- ),
222
- ("description" , models .CharField (max_length = 522 )),
223
- (
224
- "category" ,
225
- models .ForeignKey (
226
- on_delete = django .db .models .deletion .CASCADE ,
227
- to = "user.coursecategory" ,
228
- ),
229
- ),
230
- (
231
- "full_name" ,
232
- models .ForeignKey (
233
- on_delete = django .db .models .deletion .CASCADE , to = "user.teacher"
234
- ),
235
- ),
109
+ ('id' , models .BigAutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
110
+ ('created_at' , models .DateTimeField (auto_now_add = True )),
111
+ ('updated_at' , models .DateTimeField (auto_now = True )),
112
+ ('image' , models .ImageField (upload_to = 'icons/' )),
113
+ ('title' , models .CharField (max_length = 255 )),
114
+ ('duration' , models .IntegerField ()),
115
+ ('rating' , models .FloatField (validators = [django .core .validators .MaxValueValidator (5 , 'Should be 5' ), django .core .validators .MinValueValidator (1 , 'Should be 1' )])),
116
+ ('description' , models .CharField (max_length = 522 )),
117
+ ('category' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'user.coursecategory' )),
118
+ ('full_name' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'user.teacher' )),
236
119
],
237
120
options = {
238
- " db_table" : " courses" ,
121
+ ' db_table' : ' courses' ,
239
122
},
240
123
),
241
124
]
0 commit comments