Files
depot_django/preinfo/models.py
T
gitea daba5a8438 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.
2025-06-30 18:06:35 +03:00

36 lines
1.2 KiB
Python

from django.db import models
# Create your models here.
class Preinfo(models.Model):
container_number = models.CharField(
max_length=11,
)
container_type = models.ForeignKey(
'common.ContainerTypeModel',
on_delete=models.CASCADE,
related_name='preinfo_container_types',
)
line = models.ForeignKey(
'common.LinesModel',
on_delete=models.CASCADE,
related_name='preinfo_lines',
)
created_on = models.DateTimeField(auto_now_add=True)
created_by = models.ForeignKey(
'accounts.DepotUser',
on_delete=models.CASCADE,
related_name='preinfo_created_by',
db_column='created_by_id', # Ensure the column name matches your database schema
)
deleted = models.BooleanField(default=False, null=False)
deleted_by = models.ForeignKey(
'accounts.DepotUser',
on_delete=models.CASCADE,
related_name='preinfo_deleted_by',
db_column='deleted_by_id', # Ensure the column name matches your database schema
null=True,
blank=True
)
deleted_on = models.DateTimeField(null=True, blank=True)
received = models.BooleanField(default=False, null=False)