Spaces:
Sleeping
Sleeping
Upload backend/hue_portal/core/migrations/0000_initial.py with huggingface_hub
Browse files
backend/hue_portal/core/migrations/0000_initial.py
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Initial migration to create base models.
|
| 3 |
+
"""
|
| 4 |
+
from django.db import migrations, models
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
class Migration(migrations.Migration):
|
| 8 |
+
initial = True
|
| 9 |
+
|
| 10 |
+
dependencies = []
|
| 11 |
+
|
| 12 |
+
operations = [
|
| 13 |
+
migrations.CreateModel(
|
| 14 |
+
name="Procedure",
|
| 15 |
+
fields=[
|
| 16 |
+
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
| 17 |
+
("title", models.CharField(max_length=500)),
|
| 18 |
+
("domain", models.CharField(db_index=True, max_length=100)),
|
| 19 |
+
("level", models.CharField(blank=True, max_length=50)),
|
| 20 |
+
("conditions", models.TextField(blank=True)),
|
| 21 |
+
("dossier", models.TextField(blank=True)),
|
| 22 |
+
("fee", models.CharField(blank=True, max_length=200)),
|
| 23 |
+
("duration", models.CharField(blank=True, max_length=200)),
|
| 24 |
+
("authority", models.CharField(blank=True, max_length=300)),
|
| 25 |
+
("source_url", models.URLField(blank=True, max_length=1000)),
|
| 26 |
+
("updated_at", models.DateTimeField(auto_now=True)),
|
| 27 |
+
],
|
| 28 |
+
),
|
| 29 |
+
migrations.CreateModel(
|
| 30 |
+
name="Fine",
|
| 31 |
+
fields=[
|
| 32 |
+
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
| 33 |
+
("code", models.CharField(max_length=50, unique=True)),
|
| 34 |
+
("name", models.CharField(max_length=500)),
|
| 35 |
+
("article", models.CharField(blank=True, max_length=100)),
|
| 36 |
+
("decree", models.CharField(blank=True, max_length=100)),
|
| 37 |
+
("min_fine", models.DecimalField(blank=True, decimal_places=0, max_digits=12, null=True)),
|
| 38 |
+
("max_fine", models.DecimalField(blank=True, decimal_places=0, max_digits=12, null=True)),
|
| 39 |
+
("license_points", models.CharField(blank=True, max_length=50)),
|
| 40 |
+
("remedial", models.TextField(blank=True)),
|
| 41 |
+
("source_url", models.URLField(blank=True, max_length=1000)),
|
| 42 |
+
],
|
| 43 |
+
),
|
| 44 |
+
migrations.CreateModel(
|
| 45 |
+
name="Office",
|
| 46 |
+
fields=[
|
| 47 |
+
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
| 48 |
+
("unit_name", models.CharField(max_length=300)),
|
| 49 |
+
("address", models.CharField(blank=True, max_length=500)),
|
| 50 |
+
("district", models.CharField(blank=True, db_index=True, max_length=100)),
|
| 51 |
+
("working_hours", models.CharField(blank=True, max_length=200)),
|
| 52 |
+
("phone", models.CharField(blank=True, max_length=100)),
|
| 53 |
+
("email", models.EmailField(blank=True, max_length=254)),
|
| 54 |
+
("latitude", models.FloatField(blank=True, null=True)),
|
| 55 |
+
("longitude", models.FloatField(blank=True, null=True)),
|
| 56 |
+
("service_scope", models.CharField(blank=True, max_length=300)),
|
| 57 |
+
],
|
| 58 |
+
),
|
| 59 |
+
migrations.CreateModel(
|
| 60 |
+
name="Advisory",
|
| 61 |
+
fields=[
|
| 62 |
+
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
| 63 |
+
("title", models.CharField(max_length=500)),
|
| 64 |
+
("summary", models.TextField()),
|
| 65 |
+
("source_url", models.URLField(blank=True, max_length=1000)),
|
| 66 |
+
("published_at", models.DateField(blank=True, null=True)),
|
| 67 |
+
],
|
| 68 |
+
),
|
| 69 |
+
migrations.CreateModel(
|
| 70 |
+
name="Synonym",
|
| 71 |
+
fields=[
|
| 72 |
+
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
| 73 |
+
("keyword", models.CharField(max_length=120, unique=True)),
|
| 74 |
+
("alias", models.CharField(max_length=120)),
|
| 75 |
+
],
|
| 76 |
+
),
|
| 77 |
+
migrations.CreateModel(
|
| 78 |
+
name="AuditLog",
|
| 79 |
+
fields=[
|
| 80 |
+
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
| 81 |
+
("created_at", models.DateTimeField(auto_now_add=True)),
|
| 82 |
+
("ip", models.GenericIPAddressField(blank=True, null=True)),
|
| 83 |
+
("user_agent", models.CharField(blank=True, max_length=300)),
|
| 84 |
+
("path", models.CharField(max_length=300)),
|
| 85 |
+
("query", models.CharField(blank=True, max_length=500)),
|
| 86 |
+
("status", models.IntegerField(default=200)),
|
| 87 |
+
],
|
| 88 |
+
),
|
| 89 |
+
]
|
| 90 |
+
|