daba5a8438
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.
46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
from django.db import models
|
|
|
|
# Create your models here.
|
|
class NomenclatureBaseModel(models.Model):
|
|
name = models.CharField(max_length=100, unique=True)
|
|
short_name = models.CharField(max_length=5, null=True, blank=True)
|
|
description = models.TextField(blank=True, null=True)
|
|
|
|
class Meta:
|
|
abstract = True
|
|
ordering = ['name']
|
|
|
|
def __str__(self):
|
|
return self.name
|
|
|
|
|
|
class CompanyModel(NomenclatureBaseModel):
|
|
...
|
|
|
|
|
|
class LinesModel(NomenclatureBaseModel):
|
|
company = models.ForeignKey(
|
|
'common.CompanyModel',
|
|
on_delete=models.CASCADE,
|
|
related_name='line_company'
|
|
)
|
|
|
|
class OperationModel(NomenclatureBaseModel):
|
|
...
|
|
|
|
class ContainerKindModel(NomenclatureBaseModel):
|
|
...
|
|
|
|
class ContainerTypeModel(models.Model):
|
|
name = models.CharField(max_length=6, unique=True)
|
|
length = models.IntegerField()
|
|
height = models.BooleanField()
|
|
container_type = models.ForeignKey(
|
|
'common.ContainerKindModel',
|
|
on_delete=models.CASCADE,
|
|
related_name='container_type_container_kinds'
|
|
)
|
|
deleted = models.BooleanField(default=False)
|
|
|
|
def __str__(self):
|
|
return self.name |