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.
27 lines
1.1 KiB
Python
27 lines
1.1 KiB
Python
from django.db import models
|
|
from common.models import ContainerTypeModel, LinesModel, OperationModel
|
|
|
|
# Create your models here.
|
|
class BookingModel(models.Model):
|
|
number = models.CharField(max_length=50, unique=True)
|
|
vehicles = models.CharField(blank=True, null=True)
|
|
container_type = models.ForeignKey(
|
|
ContainerTypeModel,
|
|
on_delete=models.CASCADE,
|
|
related_name='booking_container_types',
|
|
)
|
|
container_count = models.IntegerField()
|
|
carrier = models.CharField(max_length=100, blank=True, null=True)
|
|
line = models.ForeignKey(
|
|
LinesModel,
|
|
on_delete=models.CASCADE,
|
|
related_name='booking_lines',
|
|
)
|
|
visible = models.BooleanField(default=True)
|
|
is_new = models.BooleanField(default=True)
|
|
container_number = models.CharField(max_length=11, blank=True, null=True)
|
|
vehicles_left = models.IntegerField(blank=True, null=True)
|
|
created_on = models.DateTimeField(auto_now_add=True)
|
|
created_by = models.IntegerField()
|
|
updated_on = models.DateTimeField(auto_now=True)
|
|
updated_by = models.IntegerField() |