mirror of
https://github.com/task-17-lct/backend.git
synced 2024-11-15 08:56:32 +03:00
381 lines
13 KiB
Python
381 lines
13 KiB
Python
|
# Generated by Django 4.2.1 on 2023-05-19 17:14
|
||
|
|
||
|
import django.contrib.postgres.fields
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
import location_field.models.plain
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
initial = True
|
||
|
|
||
|
dependencies = [
|
||
|
("contenttypes", "0002_remove_content_type_name"),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name="BasePoint",
|
||
|
fields=[
|
||
|
(
|
||
|
"oid",
|
||
|
models.CharField(max_length=24, primary_key=True, serialize=False),
|
||
|
),
|
||
|
("title", models.CharField(max_length=250)),
|
||
|
("parser_source", models.CharField(max_length=250)),
|
||
|
("description", models.TextField()),
|
||
|
("creator", models.CharField(max_length=250)),
|
||
|
("partner", models.CharField(max_length=250)),
|
||
|
("payment_method", models.CharField(max_length=250)),
|
||
|
],
|
||
|
options={
|
||
|
"abstract": False,
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="City",
|
||
|
fields=[
|
||
|
(
|
||
|
"oid",
|
||
|
models.CharField(max_length=24, primary_key=True, serialize=False),
|
||
|
),
|
||
|
("title", models.CharField(max_length=250)),
|
||
|
],
|
||
|
options={
|
||
|
"abstract": False,
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="Country",
|
||
|
fields=[
|
||
|
(
|
||
|
"oid",
|
||
|
models.CharField(max_length=24, primary_key=True, serialize=False),
|
||
|
),
|
||
|
("title", models.CharField(max_length=250)),
|
||
|
],
|
||
|
options={
|
||
|
"abstract": False,
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="Region",
|
||
|
fields=[
|
||
|
(
|
||
|
"oid",
|
||
|
models.CharField(max_length=24, primary_key=True, serialize=False),
|
||
|
),
|
||
|
("title", models.CharField(max_length=250)),
|
||
|
],
|
||
|
options={
|
||
|
"abstract": False,
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="Tag",
|
||
|
fields=[
|
||
|
(
|
||
|
"oid",
|
||
|
models.CharField(max_length=24, primary_key=True, serialize=False),
|
||
|
),
|
||
|
("name", models.CharField(max_length=250)),
|
||
|
],
|
||
|
options={
|
||
|
"abstract": False,
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="Event",
|
||
|
fields=[
|
||
|
(
|
||
|
"basepoint_ptr",
|
||
|
models.OneToOneField(
|
||
|
auto_created=True,
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
parent_link=True,
|
||
|
primary_key=True,
|
||
|
serialize=False,
|
||
|
to="events.basepoint",
|
||
|
),
|
||
|
),
|
||
|
("ya_id", models.CharField(blank=True, max_length=24)),
|
||
|
(
|
||
|
"age",
|
||
|
models.CharField(
|
||
|
max_length=50, verbose_name="Возрастное ограничение"
|
||
|
),
|
||
|
),
|
||
|
("booking_link", models.URLField()),
|
||
|
("discover_moscow_link", models.URLField()),
|
||
|
("duration", models.IntegerField(blank=True, null=True)),
|
||
|
("ticket_price", models.IntegerField(blank=True, null=True)),
|
||
|
("schedule", models.JSONField(null=True)),
|
||
|
],
|
||
|
options={
|
||
|
"abstract": False,
|
||
|
},
|
||
|
bases=("events.basepoint",),
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="Excursion",
|
||
|
fields=[
|
||
|
(
|
||
|
"basepoint_ptr",
|
||
|
models.OneToOneField(
|
||
|
auto_created=True,
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
parent_link=True,
|
||
|
primary_key=True,
|
||
|
serialize=False,
|
||
|
to="events.basepoint",
|
||
|
),
|
||
|
),
|
||
|
("duration_hours", models.IntegerField()),
|
||
|
("price", models.IntegerField()),
|
||
|
("minGroupCount", models.CharField(max_length=250)),
|
||
|
("program", models.TextField()),
|
||
|
],
|
||
|
options={
|
||
|
"abstract": False,
|
||
|
},
|
||
|
bases=("events.basepoint",),
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="Hotel",
|
||
|
fields=[
|
||
|
(
|
||
|
"basepoint_ptr",
|
||
|
models.OneToOneField(
|
||
|
auto_created=True,
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
parent_link=True,
|
||
|
primary_key=True,
|
||
|
serialize=False,
|
||
|
to="events.basepoint",
|
||
|
),
|
||
|
),
|
||
|
("address", models.CharField(max_length=250)),
|
||
|
(
|
||
|
"location",
|
||
|
location_field.models.plain.PlainLocationField(max_length=63),
|
||
|
),
|
||
|
("rooms", models.JSONField(null=True)),
|
||
|
("email", models.CharField(max_length=250)),
|
||
|
("stars", models.IntegerField(null=True)),
|
||
|
],
|
||
|
options={
|
||
|
"abstract": False,
|
||
|
},
|
||
|
bases=("events.basepoint",),
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="Museum",
|
||
|
fields=[
|
||
|
(
|
||
|
"basepoint_ptr",
|
||
|
models.OneToOneField(
|
||
|
auto_created=True,
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
parent_link=True,
|
||
|
primary_key=True,
|
||
|
serialize=False,
|
||
|
to="events.basepoint",
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
options={
|
||
|
"abstract": False,
|
||
|
},
|
||
|
bases=("events.basepoint",),
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="Restaurant",
|
||
|
fields=[
|
||
|
(
|
||
|
"basepoint_ptr",
|
||
|
models.OneToOneField(
|
||
|
auto_created=True,
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
parent_link=True,
|
||
|
primary_key=True,
|
||
|
serialize=False,
|
||
|
to="events.basepoint",
|
||
|
),
|
||
|
),
|
||
|
("bill", models.IntegerField()),
|
||
|
("avg_time_visit", models.IntegerField()),
|
||
|
("can_reserve", models.BooleanField()),
|
||
|
("working_time", models.JSONField(null=True)),
|
||
|
(
|
||
|
"location",
|
||
|
location_field.models.plain.PlainLocationField(max_length=63),
|
||
|
),
|
||
|
("phone", models.CharField(max_length=18)),
|
||
|
],
|
||
|
options={
|
||
|
"abstract": False,
|
||
|
},
|
||
|
bases=("events.basepoint",),
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="PointMedia",
|
||
|
fields=[
|
||
|
(
|
||
|
"oid",
|
||
|
models.CharField(max_length=24, primary_key=True, serialize=False),
|
||
|
),
|
||
|
("file", models.FileField(upload_to="uploads/")),
|
||
|
("type", models.CharField(max_length=200)),
|
||
|
(
|
||
|
"point",
|
||
|
models.ForeignKey(
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
related_name="media",
|
||
|
to="events.basepoint",
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
options={
|
||
|
"abstract": False,
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="Place",
|
||
|
fields=[
|
||
|
(
|
||
|
"oid",
|
||
|
models.CharField(max_length=24, primary_key=True, serialize=False),
|
||
|
),
|
||
|
("address", models.CharField(max_length=250)),
|
||
|
("parser_source", models.CharField(max_length=250)),
|
||
|
("description", models.TextField()),
|
||
|
(
|
||
|
"location",
|
||
|
location_field.models.plain.PlainLocationField(max_length=63),
|
||
|
),
|
||
|
(
|
||
|
"sites",
|
||
|
django.contrib.postgres.fields.ArrayField(
|
||
|
base_field=models.CharField(max_length=250), size=None
|
||
|
),
|
||
|
),
|
||
|
(
|
||
|
"phones",
|
||
|
django.contrib.postgres.fields.ArrayField(
|
||
|
base_field=models.CharField(max_length=250), size=None
|
||
|
),
|
||
|
),
|
||
|
("working_time", models.JSONField(null=True)),
|
||
|
(
|
||
|
"city",
|
||
|
models.ForeignKey(
|
||
|
null=True,
|
||
|
on_delete=django.db.models.deletion.SET_NULL,
|
||
|
related_name="places",
|
||
|
to="events.city",
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
options={
|
||
|
"abstract": False,
|
||
|
},
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name="city",
|
||
|
name="region",
|
||
|
field=models.ForeignKey(
|
||
|
null=True,
|
||
|
on_delete=django.db.models.deletion.SET_NULL,
|
||
|
related_name="cities",
|
||
|
to="events.region",
|
||
|
),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name="basepoint",
|
||
|
name="city",
|
||
|
field=models.ForeignKey(
|
||
|
null=True,
|
||
|
on_delete=django.db.models.deletion.SET_NULL,
|
||
|
related_name="points",
|
||
|
to="events.city",
|
||
|
),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name="basepoint",
|
||
|
name="polymorphic_ctype",
|
||
|
field=models.ForeignKey(
|
||
|
editable=False,
|
||
|
null=True,
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
related_name="polymorphic_%(app_label)s.%(class)s_set+",
|
||
|
to="contenttypes.contenttype",
|
||
|
),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name="basepoint",
|
||
|
name="region",
|
||
|
field=models.ForeignKey(
|
||
|
null=True,
|
||
|
on_delete=django.db.models.deletion.SET_NULL,
|
||
|
related_name="points",
|
||
|
to="events.region",
|
||
|
),
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="HotelPhone",
|
||
|
fields=[
|
||
|
(
|
||
|
"id",
|
||
|
models.BigAutoField(
|
||
|
auto_created=True,
|
||
|
primary_key=True,
|
||
|
serialize=False,
|
||
|
verbose_name="ID",
|
||
|
),
|
||
|
),
|
||
|
("name", models.CharField(max_length=50)),
|
||
|
("number", models.CharField(max_length=18)),
|
||
|
(
|
||
|
"hotel",
|
||
|
models.ForeignKey(
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
related_name="phones",
|
||
|
to="events.hotel",
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name="ExcursionRoute",
|
||
|
fields=[
|
||
|
(
|
||
|
"id",
|
||
|
models.BigAutoField(
|
||
|
auto_created=True,
|
||
|
primary_key=True,
|
||
|
serialize=False,
|
||
|
verbose_name="ID",
|
||
|
),
|
||
|
),
|
||
|
("active", models.BooleanField(default=True)),
|
||
|
(
|
||
|
"excursion",
|
||
|
models.ForeignKey(
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
related_name="routes",
|
||
|
to="events.excursion",
|
||
|
),
|
||
|
),
|
||
|
(
|
||
|
"point",
|
||
|
models.ForeignKey(
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
related_name="routes",
|
||
|
to="events.event",
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
]
|