Add IntelliJ IDEA project configuration files
This commit adds IntelliJ IDEA-specific configuration files for the project, including module setup, version control integration, inspection profiles, and workspace settings. These files facilitate development environment configuration for contributors using IntelliJ IDEA.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ContainersConfig(AppConfig):
|
||||
default_auto_field = "django.db.models.BigAutoField"
|
||||
name = "containers"
|
||||
@@ -0,0 +1,112 @@
|
||||
# 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",),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,51 @@
|
||||
from django.db import models
|
||||
from common.models import LinesModel, ContainerTypeModel
|
||||
|
||||
# Create your models here.
|
||||
class Container(models.Model):
|
||||
number = models.CharField(max_length=11)
|
||||
line_id = models.ForeignKey(
|
||||
LinesModel,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='container_lines',
|
||||
)
|
||||
container_type = models.ForeignKey(
|
||||
ContainerTypeModel,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='container_container_types',
|
||||
)
|
||||
received_on = models.DateTimeField(auto_now_add=True)
|
||||
received_by = models.IntegerField()
|
||||
receive_vehicles = models.CharField(max_length=100, blank=True, null=True)
|
||||
damages = models.TextField(blank=True, null=True)
|
||||
heavy_damaged = models.BooleanField(default=False)
|
||||
position = models.CharField(max_length=100, blank=True, 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)
|
||||
booking = models.ForeignKey(
|
||||
'booking.BookingModel',
|
||||
on_delete=models.CASCADE,
|
||||
related_name='container_bookings',
|
||||
)
|
||||
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(max_length=100, blank=True, null=True)
|
||||
|
||||
|
||||
class ContainerHistory(Container):
|
||||
operation = models.ForeignKey(
|
||||
'common.OperationModel',
|
||||
on_delete=models.CASCADE,
|
||||
related_name='history_operations',
|
||||
)
|
||||
operation_date = models.DateTimeField(auto_now_add=True)
|
||||
container = models.ForeignKey(
|
||||
Container,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='history_containers'
|
||||
)
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
Reference in New Issue
Block a user