0001_initial.py 36.8 KB
Newer Older
1
# Generated by Django 2.1.7 on 2019-06-26 21:10
Florent Chehab's avatar
Florent Chehab committed
2 3

import backend_app.fields
4
import backend_app.models.abstract.essentialModule
5
import backend_app.validation.validators
Florent Chehab's avatar
Florent Chehab committed
6 7 8 9 10 11 12 13
import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

14
    dependencies = []
Florent Chehab's avatar
Florent Chehab committed
15 16 17

    operations = [
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
18
            name="Campus",
Florent Chehab's avatar
Florent Chehab committed
19
            fields=[
Florent Chehab's avatar
Florent Chehab committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("updated_on", models.DateTimeField(null=True)),
                ("moderated_on", models.DateTimeField(null=True)),
                (
                    "obj_moderation_level",
                    models.SmallIntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(0),
37
                            backend_app.models.abstract.essentialModule.validate_obj_model_lv,
Florent Chehab's avatar
Florent Chehab committed
38 39 40
                        ],
                    ),
                ),
41 42
                ("has_pending_moderation", models.BooleanField(default=False)),
                ("nb_versions", models.PositiveIntegerField(default=0)),
Florent Chehab's avatar
Florent Chehab committed
43 44
                ("title", models.CharField(blank=True, default="", max_length=150)),
                ("comment", models.CharField(blank=True, default="", max_length=5000)),
45 46 47 48 49 50 51 52 53
                (
                    "useful_links",
                    backend_app.fields.JSONField(
                        default=list,
                        validators=[
                            backend_app.validation.validators.UsefulLinksValidator()
                        ],
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
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
                (
                    "importance_level",
                    models.CharField(
                        choices=[
                            ("-", "normal"),
                            ("+", "important"),
                            ("++", "IMPORTANT"),
                        ],
                        default="-",
                        max_length=2,
                    ),
                ),
                ("is_main_campus", models.BooleanField()),
                ("name", models.CharField(blank=True, default="", max_length=200)),
                (
                    "lat",
                    models.DecimalField(
                        decimal_places=6,
                        max_digits=10,
                        validators=[
                            django.core.validators.MinValueValidator(-85.05112878),
                            django.core.validators.MaxValueValidator(85.05112878),
                        ],
                    ),
                ),
                (
                    "lon",
                    models.DecimalField(
                        decimal_places=6,
                        max_digits=10,
                        validators=[
                            django.core.validators.MinValueValidator(-180),
                            django.core.validators.MaxValueValidator(180),
                        ],
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
90 91 92
            ],
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
93
            name="City",
Florent Chehab's avatar
Florent Chehab committed
94
            fields=[
Florent Chehab's avatar
Florent Chehab committed
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=200)),
                (
                    "local_name",
                    models.CharField(blank=True, default="", max_length=200),
                ),
                ("area", models.CharField(blank=True, default="", max_length=200)),
Florent Chehab's avatar
Florent Chehab committed
110
            ],
Florent Chehab's avatar
Florent Chehab committed
111
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
112 113
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
114
            name="Country",
Florent Chehab's avatar
Florent Chehab committed
115
            fields=[
Florent Chehab's avatar
Florent Chehab committed
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
                ("name", models.CharField(max_length=200)),
                (
                    "iso_alpha2_code",
                    models.CharField(max_length=2, primary_key=True, serialize=False),
                ),
                (
                    "iso_alpha3_code",
                    models.CharField(blank=True, default="", max_length=3, unique=True),
                ),
                ("region_name", models.CharField(max_length=200)),
                ("region_un_code", models.CharField(max_length=3)),
                (
                    "sub_region_name",
                    models.CharField(blank=True, default="", max_length=200),
                ),
                (
                    "sub_region_un_code",
                    models.CharField(blank=True, default="", max_length=3),
                ),
                (
                    "intermediate_region_name",
                    models.CharField(blank=True, default="", max_length=200),
                ),
                (
                    "intermediate_region_un_code",
                    models.CharField(blank=True, default="", max_length=3),
                ),
Florent Chehab's avatar
Florent Chehab committed
143
            ],
Florent Chehab's avatar
Florent Chehab committed
144
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
145 146
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
147
            name="CountryDri",
Florent Chehab's avatar
Florent Chehab committed
148
            fields=[
Florent Chehab's avatar
Florent Chehab committed
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("updated_on", models.DateTimeField(null=True)),
                ("moderated_on", models.DateTimeField(null=True)),
                (
                    "obj_moderation_level",
                    models.SmallIntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(0),
166
                            backend_app.models.abstract.essentialModule.validate_obj_model_lv,
Florent Chehab's avatar
Florent Chehab committed
167 168 169
                        ],
                    ),
                ),
170 171
                ("has_pending_moderation", models.BooleanField(default=False)),
                ("nb_versions", models.PositiveIntegerField(default=0)),
Florent Chehab's avatar
Florent Chehab committed
172 173
                ("title", models.CharField(blank=True, default="", max_length=150)),
                ("comment", models.CharField(blank=True, default="", max_length=5000)),
174 175 176 177 178 179 180 181 182
                (
                    "useful_links",
                    backend_app.fields.JSONField(
                        default=list,
                        validators=[
                            backend_app.validation.validators.UsefulLinksValidator()
                        ],
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
183 184 185 186 187 188 189 190 191 192 193 194
                (
                    "importance_level",
                    models.CharField(
                        choices=[
                            ("-", "normal"),
                            ("+", "important"),
                            ("++", "IMPORTANT"),
                        ],
                        default="-",
                        max_length=2,
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
195
            ],
Florent Chehab's avatar
Florent Chehab committed
196
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
197 198
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
199
            name="CountryScholarship",
Florent Chehab's avatar
Florent Chehab committed
200
            fields=[
Florent Chehab's avatar
Florent Chehab committed
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("updated_on", models.DateTimeField(null=True)),
                ("moderated_on", models.DateTimeField(null=True)),
                (
                    "obj_moderation_level",
                    models.SmallIntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(0),
218
                            backend_app.models.abstract.essentialModule.validate_obj_model_lv,
Florent Chehab's avatar
Florent Chehab committed
219 220 221
                        ],
                    ),
                ),
222 223
                ("has_pending_moderation", models.BooleanField(default=False)),
                ("nb_versions", models.PositiveIntegerField(default=0)),
Florent Chehab's avatar
Florent Chehab committed
224 225
                ("title", models.CharField(blank=True, default="", max_length=150)),
                ("comment", models.CharField(blank=True, default="", max_length=5000)),
226 227 228 229 230 231 232 233 234
                (
                    "useful_links",
                    backend_app.fields.JSONField(
                        default=list,
                        validators=[
                            backend_app.validation.validators.UsefulLinksValidator()
                        ],
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
235 236 237 238 239 240 241 242 243 244 245 246
                (
                    "importance_level",
                    models.CharField(
                        choices=[
                            ("-", "normal"),
                            ("+", "important"),
                            ("++", "IMPORTANT"),
                        ],
                        default="-",
                        max_length=2,
                    ),
                ),
247
                ("short_description", models.CharField(max_length=200)),
Florent Chehab's avatar
Florent Chehab committed
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
                (
                    "other_advantages",
                    models.CharField(blank=True, default="", max_length=5000),
                ),
                (
                    "frequency",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("w", "week"),
                            ("m", "month"),
                            ("s", "semester"),
                            ("y", "year"),
                            ("o", "one_shot"),
                        ],
                        default="m",
                        max_length=1,
                        null=True,
                    ),
                ),
                (
                    "amount_min",
                    models.DecimalField(
                        decimal_places=2,
                        max_digits=20,
                        null=True,
                        validators=[django.core.validators.MinValueValidator(0)],
                    ),
                ),
                (
                    "amount_max",
                    models.DecimalField(
                        decimal_places=2,
                        max_digits=20,
                        null=True,
                        validators=[django.core.validators.MinValueValidator(0)],
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
286
            ],
Florent Chehab's avatar
Florent Chehab committed
287
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
288 289
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
290
            name="CountryTaggedItem",
Florent Chehab's avatar
Florent Chehab committed
291
            fields=[
Florent Chehab's avatar
Florent Chehab committed
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("updated_on", models.DateTimeField(null=True)),
                ("moderated_on", models.DateTimeField(null=True)),
                (
                    "obj_moderation_level",
                    models.SmallIntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(0),
309
                            backend_app.models.abstract.essentialModule.validate_obj_model_lv,
Florent Chehab's avatar
Florent Chehab committed
310 311 312
                        ],
                    ),
                ),
313 314
                ("has_pending_moderation", models.BooleanField(default=False)),
                ("nb_versions", models.PositiveIntegerField(default=0)),
Florent Chehab's avatar
Florent Chehab committed
315
                (
316
                    "tag",
Florent Chehab's avatar
Florent Chehab committed
317 318
                    models.CharField(
                        choices=[
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424
                            ("immigration", "immigration"),
                            ("administrative", "administrative"),
                            ("culture", "culture"),
                            ("tourism", "tourism"),
                            ("transport", "transport"),
                            ("other", "other"),
                        ],
                        max_length=20,
                    ),
                ),
                ("comment", models.CharField(blank=True, default="", max_length=5000)),
                (
                    "useful_links",
                    backend_app.fields.JSONField(
                        default=list,
                        validators=[
                            backend_app.validation.validators.UsefulLinksValidator()
                        ],
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Course",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("utc_exchange_id", models.IntegerField()),
                ("course_id", models.IntegerField()),
                ("code", models.CharField(max_length=10)),
                (
                    "title",
                    models.CharField(blank=True, default="", max_length=200, null=True),
                ),
                ("link", models.URLField(blank=True, max_length=500, null=True)),
                ("nb_credit", models.PositiveIntegerField(default=0)),
                ("category", models.CharField(blank=True, max_length=5, null=True)),
                ("profile", models.CharField(blank=True, max_length=10, null=True)),
                ("tsh_profile", models.CharField(blank=True, max_length=21, null=True)),
                (
                    "student_login",
                    models.CharField(blank=True, max_length=8, null=True),
                ),
            ],
            options={"abstract": False},
        ),
        migrations.CreateModel(
            name="CourseFeedback",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("updated_on", models.DateTimeField(null=True)),
                ("moderated_on", models.DateTimeField(null=True)),
                (
                    "obj_moderation_level",
                    models.SmallIntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(0),
                            backend_app.models.abstract.essentialModule.validate_obj_model_lv,
                        ],
                    ),
                ),
                ("has_pending_moderation", models.BooleanField(default=False)),
                ("comment", models.TextField(max_length=1500, null=True)),
                (
                    "adequation",
                    models.IntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(-5),
                            django.core.validators.MaxValueValidator(5),
                        ],
                    ),
                ),
                (
                    "would_recommend",
                    models.IntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(-5),
                            django.core.validators.MaxValueValidator(5),
                        ],
                    ),
                ),
                (
                    "working_dose",
                    models.IntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(-5),
                            django.core.validators.MaxValueValidator(5),
Florent Chehab's avatar
Florent Chehab committed
425 426 427 428
                        ],
                    ),
                ),
                (
429 430 431 432 433 434 435
                    "following_ease",
                    models.IntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(-5),
                            django.core.validators.MaxValueValidator(5),
                        ],
Florent Chehab's avatar
Florent Chehab committed
436 437
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
438
            ],
439
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
440 441
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
442
            name="Currency",
Florent Chehab's avatar
Florent Chehab committed
443
            fields=[
Florent Chehab's avatar
Florent Chehab committed
444 445 446 447 448 449 450 451 452 453 454 455 456 457
                (
                    "code",
                    models.CharField(max_length=3, primary_key=True, serialize=False),
                ),
                ("name", models.CharField(max_length=100)),
                ("symbol", models.CharField(blank=True, default="", max_length=30)),
                (
                    "one_EUR_in_this_currency",
                    models.DecimalField(
                        decimal_places=6,
                        max_digits=20,
                        validators=[django.core.validators.MinValueValidator(0)],
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
458
            ],
Florent Chehab's avatar
Florent Chehab committed
459
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
460 461
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
462
            name="Department",
Florent Chehab's avatar
Florent Chehab committed
463
            fields=[
Florent Chehab's avatar
Florent Chehab committed
464 465 466 467 468 469
                (
                    "code",
                    models.CharField(max_length=6, primary_key=True, serialize=False),
                ),
                ("name", models.CharField(max_length=100)),
                ("active", models.BooleanField()),
Florent Chehab's avatar
Florent Chehab committed
470
            ],
Florent Chehab's avatar
Florent Chehab committed
471
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
472
        ),
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538
        migrations.CreateModel(
            name="Exchange",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("utc_departure_id", models.IntegerField()),
                ("year", models.PositiveIntegerField(default=2018)),
                (
                    "semester",
                    models.CharField(
                        choices=[("a", "autumn"), ("p", "spring")],
                        default="a",
                        max_length=5,
                    ),
                ),
                ("duration", models.PositiveIntegerField()),
                ("dual_degree", models.BooleanField()),
                ("master_obtained", models.BooleanField()),
                ("student_major", models.CharField(max_length=20)),
                ("student_minor", models.CharField(max_length=7)),
                ("student_option", models.CharField(max_length=7)),
                ("utc_allow_courses", models.BooleanField()),
                ("utc_allow_login", models.BooleanField()),
            ],
            options={"abstract": False},
        ),
        migrations.CreateModel(
            name="File",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "file",
                    models.FileField(
                        blank=True, null=True, upload_to="files/%Y/%m/%d/"
                    ),
                ),
                (
                    "title",
                    models.CharField(blank=True, default="", max_length=200, null=True),
                ),
                (
                    "licence",
                    models.CharField(blank=True, default="", max_length=100, null=True),
                ),
                (
                    "description",
                    models.CharField(blank=True, default="", max_length=500, null=True),
                ),
            ],
            options={"abstract": False},
        ),
Florent Chehab's avatar
Florent Chehab committed
539
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
540
            name="ForTestingModeration",
Florent Chehab's avatar
Florent Chehab committed
541
            fields=[
Florent Chehab's avatar
Florent Chehab committed
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("updated_on", models.DateTimeField(null=True)),
                ("moderated_on", models.DateTimeField(null=True)),
                (
                    "obj_moderation_level",
                    models.SmallIntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(0),
559
                            backend_app.models.abstract.essentialModule.validate_obj_model_lv,
Florent Chehab's avatar
Florent Chehab committed
560 561 562
                        ],
                    ),
                ),
563
                ("has_pending_moderation", models.BooleanField(default=False)),
Florent Chehab's avatar
Florent Chehab committed
564
                ("aaa", models.CharField(max_length=100)),
Florent Chehab's avatar
Florent Chehab committed
565
            ],
Florent Chehab's avatar
Florent Chehab committed
566
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
567 568
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
569
            name="ForTestingVersioning",
Florent Chehab's avatar
Florent Chehab committed
570
            fields=[
Florent Chehab's avatar
Florent Chehab committed
571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("updated_on", models.DateTimeField(null=True)),
                ("moderated_on", models.DateTimeField(null=True)),
                (
                    "obj_moderation_level",
                    models.SmallIntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(0),
588
                            backend_app.models.abstract.essentialModule.validate_obj_model_lv,
Florent Chehab's avatar
Florent Chehab committed
589 590 591
                        ],
                    ),
                ),
592 593
                ("has_pending_moderation", models.BooleanField(default=False)),
                ("nb_versions", models.PositiveIntegerField(default=0)),
Florent Chehab's avatar
Florent Chehab committed
594
                ("bbb", models.CharField(max_length=100)),
Florent Chehab's avatar
Florent Chehab committed
595
            ],
Florent Chehab's avatar
Florent Chehab committed
596
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
597
        ),
598 599 600 601 602 603 604 605 606 607 608
        migrations.CreateModel(
            name="Language",
            fields=[
                (
                    "code_iso",
                    models.CharField(max_length=5, primary_key=True, serialize=False),
                ),
                ("name", models.CharField(max_length=100)),
            ],
            options={"abstract": False},
        ),
Florent Chehab's avatar
Florent Chehab committed
609
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
610
            name="Offer",
Florent Chehab's avatar
Florent Chehab committed
611
            fields=[
Florent Chehab's avatar
Florent Chehab committed
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("year", models.PositiveIntegerField(default=2018)),
                (
                    "semester",
                    models.CharField(
                        choices=[("a", "autumn"), ("p", "spring")],
                        default="a",
                        max_length=2,
                    ),
                ),
                ("nb_seats_offered", models.PositiveIntegerField()),
                ("nb_seats_offered_exchange", models.PositiveIntegerField(null=True)),
                (
                    "nb_seats_offered_double_degree",
                    models.PositiveIntegerField(null=True),
                ),
Florent Chehab's avatar
Florent Chehab committed
636
            ],
Florent Chehab's avatar
Florent Chehab committed
637
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
638 639
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
640
            name="PendingModeration",
Florent Chehab's avatar
Florent Chehab committed
641
            fields=[
Florent Chehab's avatar
Florent Chehab committed
642 643 644 645 646 647 648 649 650 651 652 653
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("object_id", models.CharField(max_length=100)),
                ("updated_on", models.DateTimeField(null=True)),
                ("new_object", backend_app.fields.JSONField(default=dict)),
Florent Chehab's avatar
Florent Chehab committed
654 655 656
            ],
        ),
        migrations.CreateModel(
657
            name="Picture",
Florent Chehab's avatar
Florent Chehab committed
658
            fields=[
Florent Chehab's avatar
Florent Chehab committed
659 660 661 662 663 664 665 666 667 668
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
669 670
                    "title",
                    models.CharField(blank=True, default="", max_length=200, null=True),
Florent Chehab's avatar
Florent Chehab committed
671 672
                ),
                (
673 674
                    "licence",
                    models.CharField(blank=True, default="", max_length=100, null=True),
Florent Chehab's avatar
Florent Chehab committed
675 676
                ),
                (
677 678
                    "description",
                    models.CharField(blank=True, default="", max_length=500, null=True),
Florent Chehab's avatar
Florent Chehab committed
679 680
                ),
                (
681 682 683
                    "file",
                    models.FileField(
                        blank=True,
Florent Chehab's avatar
Florent Chehab committed
684
                        null=True,
685 686
                        upload_to="pictures/%Y/%m/%d/",
                        validators=[backend_app.validation.validators.ImageValidator()],
Florent Chehab's avatar
Florent Chehab committed
687 688
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
689
            ],
690
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
691 692
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
693
            name="RecommendationList",
Florent Chehab's avatar
Florent Chehab committed
694
            fields=[
Florent Chehab's avatar
Florent Chehab committed
695 696 697 698 699 700 701 702 703
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
704 705 706 707
                ("last_update", models.DateTimeField(auto_now=True)),
                ("title", models.CharField(max_length=100)),
                ("is_public", models.BooleanField(default=False)),
                ("description", models.CharField(default="", max_length=300)),
Florent Chehab's avatar
Florent Chehab committed
708
                (
709 710 711
                    "content",
                    backend_app.fields.JSONField(
                        default=list,
Florent Chehab's avatar
Florent Chehab committed
712
                        validators=[
713 714
                            backend_app.validation.validators.RecommendationListJsonContentValidator(),
                            backend_app.validation.validators.RecommendationListUnivValidator(),
Florent Chehab's avatar
Florent Chehab committed
715 716 717
                        ],
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
718
            ],
719
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
720 721
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
722
            name="Specialty",
Florent Chehab's avatar
Florent Chehab committed
723
            fields=[
Florent Chehab's avatar
Florent Chehab committed
724 725 726 727 728 729 730 731 732 733 734 735
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("code", models.CharField(max_length=6)),
                ("name", models.CharField(max_length=100)),
                ("active", models.BooleanField()),
Florent Chehab's avatar
Florent Chehab committed
736 737 738
            ],
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
739
            name="University",
Florent Chehab's avatar
Florent Chehab committed
740
            fields=[
Florent Chehab's avatar
Florent Chehab committed
741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("updated_on", models.DateTimeField(null=True)),
                ("moderated_on", models.DateTimeField(null=True)),
                (
                    "obj_moderation_level",
                    models.SmallIntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(0),
758
                            backend_app.models.abstract.essentialModule.validate_obj_model_lv,
Florent Chehab's avatar
Florent Chehab committed
759 760 761
                        ],
                    ),
                ),
762
                ("has_pending_moderation", models.BooleanField(default=False)),
Florent Chehab's avatar
Florent Chehab committed
763 764
                ("name", models.CharField(max_length=200)),
                ("acronym", models.CharField(blank=True, default="", max_length=20)),
765 766 767 768 769 770 771 772 773 774 775 776
                (
                    "logo",
                    models.URLField(
                        blank=True,
                        default="",
                        validators=[
                            backend_app.validation.validators.PathExtensionValidator(
                                ["jpg", "jpeg", "png", "svg"]
                            )
                        ],
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
777 778
                ("website", models.URLField(blank=True, default="", max_length=300)),
                ("utc_id", models.IntegerField(unique=True)),
Florent Chehab's avatar
Florent Chehab committed
779
            ],
Florent Chehab's avatar
Florent Chehab committed
780
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
781 782
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
783
            name="UniversityDri",
Florent Chehab's avatar
Florent Chehab committed
784
            fields=[
Florent Chehab's avatar
Florent Chehab committed
785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("updated_on", models.DateTimeField(null=True)),
                ("moderated_on", models.DateTimeField(null=True)),
                (
                    "obj_moderation_level",
                    models.SmallIntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(0),
802
                            backend_app.models.abstract.essentialModule.validate_obj_model_lv,
Florent Chehab's avatar
Florent Chehab committed
803 804 805
                        ],
                    ),
                ),
806 807
                ("has_pending_moderation", models.BooleanField(default=False)),
                ("nb_versions", models.PositiveIntegerField(default=0)),
Florent Chehab's avatar
Florent Chehab committed
808 809
                ("title", models.CharField(blank=True, default="", max_length=150)),
                ("comment", models.CharField(blank=True, default="", max_length=5000)),
810 811 812 813 814 815 816 817 818
                (
                    "useful_links",
                    backend_app.fields.JSONField(
                        default=list,
                        validators=[
                            backend_app.validation.validators.UsefulLinksValidator()
                        ],
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
819 820 821 822 823 824 825 826 827 828 829 830
                (
                    "importance_level",
                    models.CharField(
                        choices=[
                            ("-", "normal"),
                            ("+", "important"),
                            ("++", "IMPORTANT"),
                        ],
                        default="-",
                        max_length=2,
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
831
            ],
Florent Chehab's avatar
Florent Chehab committed
832
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
833 834
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
835
            name="UniversityScholarship",
Florent Chehab's avatar
Florent Chehab committed
836
            fields=[
Florent Chehab's avatar
Florent Chehab committed
837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("updated_on", models.DateTimeField(null=True)),
                ("moderated_on", models.DateTimeField(null=True)),
                (
                    "obj_moderation_level",
                    models.SmallIntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(0),
854
                            backend_app.models.abstract.essentialModule.validate_obj_model_lv,
Florent Chehab's avatar
Florent Chehab committed
855 856 857
                        ],
                    ),
                ),
858 859
                ("has_pending_moderation", models.BooleanField(default=False)),
                ("nb_versions", models.PositiveIntegerField(default=0)),
Florent Chehab's avatar
Florent Chehab committed
860 861
                ("title", models.CharField(blank=True, default="", max_length=150)),
                ("comment", models.CharField(blank=True, default="", max_length=5000)),
862 863 864 865 866 867 868 869 870
                (
                    "useful_links",
                    backend_app.fields.JSONField(
                        default=list,
                        validators=[
                            backend_app.validation.validators.UsefulLinksValidator()
                        ],
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
871 872 873 874 875 876 877 878 879 880 881 882
                (
                    "importance_level",
                    models.CharField(
                        choices=[
                            ("-", "normal"),
                            ("+", "important"),
                            ("++", "IMPORTANT"),
                        ],
                        default="-",
                        max_length=2,
                    ),
                ),
883
                ("short_description", models.CharField(max_length=200)),
Florent Chehab's avatar
Florent Chehab committed
884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921
                (
                    "other_advantages",
                    models.CharField(blank=True, default="", max_length=5000),
                ),
                (
                    "frequency",
                    models.CharField(
                        blank=True,
                        choices=[
                            ("w", "week"),
                            ("m", "month"),
                            ("s", "semester"),
                            ("y", "year"),
                            ("o", "one_shot"),
                        ],
                        default="m",
                        max_length=1,
                        null=True,
                    ),
                ),
                (
                    "amount_min",
                    models.DecimalField(
                        decimal_places=2,
                        max_digits=20,
                        null=True,
                        validators=[django.core.validators.MinValueValidator(0)],
                    ),
                ),
                (
                    "amount_max",
                    models.DecimalField(
                        decimal_places=2,
                        max_digits=20,
                        null=True,
                        validators=[django.core.validators.MinValueValidator(0)],
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
922
            ],
Florent Chehab's avatar
Florent Chehab committed
923
            options={"abstract": False},
Florent Chehab's avatar
Florent Chehab committed
924 925
        ),
        migrations.CreateModel(
Florent Chehab's avatar
Florent Chehab committed
926
            name="UniversityTaggedItem",
Florent Chehab's avatar
Florent Chehab committed
927
            fields=[
Florent Chehab's avatar
Florent Chehab committed
928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("updated_on", models.DateTimeField(null=True)),
                ("moderated_on", models.DateTimeField(null=True)),
                (
                    "obj_moderation_level",
                    models.SmallIntegerField(
                        default=0,
                        validators=[
                            django.core.validators.MinValueValidator(0),
945
                            backend_app.models.abstract.essentialModule.validate_obj_model_lv,
Florent Chehab's avatar
Florent Chehab committed
946 947 948
                        ],
                    ),
                ),
949 950
                ("has_pending_moderation", models.BooleanField(default=False)),
                ("nb_versions", models.PositiveIntegerField(default=0)),
Florent Chehab's avatar
Florent Chehab committed
951
                (
952
                    "tag",
Florent Chehab's avatar
Florent Chehab committed
953 954
                    models.CharField(
                        choices=[
955 956 957 958 959
                            ("accommodation", "accommodation"),
                            ("administrative", "administrative"),
                            ("transport", "transport"),
                            ("student_life", "student_life"),
                            ("other", "other"),
Florent Chehab's avatar
Florent Chehab committed
960
                        ],
961
                        max_length=20,
Florent Chehab's avatar
Florent Chehab committed
962 963 964 965
                    ),
                ),
                ("comment", models.CharField(blank=True, default="", max_length=5000)),
                (
966 967 968
                    "useful_links",
                    backend_app.fields.JSONField(
                        default=list,
Florent Chehab's avatar
Florent Chehab committed
969
                        validators=[
970
                            backend_app.validation.validators.UsefulLinksValidator()
Florent Chehab's avatar
Florent Chehab committed
971 972 973
                        ],
                    ),
                ),
Florent Chehab's avatar
Florent Chehab committed
974 975 976
            ],
        ),
    ]