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.
36 lines
1.2 KiB
Python
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)
|