You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
113 lines
4.2 KiB
Python
113 lines
4.2 KiB
Python
# Generated by Django 5.2.3 on 2025-06-25 12:33
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
("booking", "0001_initial"),
|
|
("common", "0001_initial"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="Container",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("number", models.CharField(max_length=11)),
|
|
("received_on", models.DateTimeField(auto_now_add=True)),
|
|
("received_by", models.IntegerField()),
|
|
(
|
|
"receive_vehicles",
|
|
models.CharField(blank=True, max_length=100, null=True),
|
|
),
|
|
("damages", models.TextField(blank=True, null=True)),
|
|
("heavy_damaged", models.BooleanField(default=False)),
|
|
("position", models.CharField(blank=True, max_length=100, null=True)),
|
|
("swept", models.BooleanField(default=False)),
|
|
("swept_on", models.DateTimeField(blank=True, null=True)),
|
|
("swept_by", models.IntegerField(blank=True, null=True)),
|
|
("washed", models.BooleanField(default=False)),
|
|
("washed_on", models.DateTimeField(blank=True, null=True)),
|
|
("washed_by", models.IntegerField(blank=True, null=True)),
|
|
("expedited", models.BooleanField(default=False)),
|
|
("expedited_on", models.DateTimeField(blank=True, null=True)),
|
|
("expedited_by", models.IntegerField(blank=True, null=True)),
|
|
(
|
|
"expedition_vehicle",
|
|
models.CharField(blank=True, max_length=100, null=True),
|
|
),
|
|
(
|
|
"booking",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="container_bookings",
|
|
to="booking.bookingmodel",
|
|
),
|
|
),
|
|
(
|
|
"container_type",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="container_container_types",
|
|
to="common.containertypemodel",
|
|
),
|
|
),
|
|
(
|
|
"line_id",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="container_lines",
|
|
to="common.linesmodel",
|
|
),
|
|
),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name="ContainerHistory",
|
|
fields=[
|
|
(
|
|
"container_ptr",
|
|
models.OneToOneField(
|
|
auto_created=True,
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
parent_link=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
to="containers.container",
|
|
),
|
|
),
|
|
("operation_date", models.DateTimeField(auto_now_add=True)),
|
|
(
|
|
"container",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="history_containers",
|
|
to="containers.container",
|
|
),
|
|
),
|
|
(
|
|
"operation",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="history_operations",
|
|
to="common.operationmodel",
|
|
),
|
|
),
|
|
],
|
|
bases=("containers.container",),
|
|
),
|
|
]
|