feat: Implement general catalogs for ports, unit conversions, and units of measure
- Added models, DTOs, services, and routes for ports, including CRUD operations. - Introduced unit conversions with corresponding models, DTOs, services, and routes. - Developed units of measure with detailed models, DTOs, services, and routes for various types. - Ensured all new features are integrated with FastAPI and SQLAlchemy for seamless database interactions.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from decimal import Decimal
|
||||
|
||||
from api.v1.common.base_models import TenantScopedMixin
|
||||
from api.v1.common.base_models import TenantScopedMixin, TimestampMixin
|
||||
from core.database import Base
|
||||
from sqlalchemy import (
|
||||
Boolean,
|
||||
@@ -13,16 +13,10 @@ from sqlalchemy import (
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
|
||||
class QClasses(Base, TenantScopedMixin):
|
||||
class QClasses(Base, TenantScopedMixin, TimestampMixin):
|
||||
__tablename__ = "fa_classes" # QClases
|
||||
__table_args__ = (
|
||||
PrimaryKeyConstraint("id", name="qclases_pk"),
|
||||
ForeignKeyConstraint(
|
||||
["tenant_id"], ["a76.tenants.id"], name="fk_qclasses_tenants"
|
||||
),
|
||||
ForeignKeyConstraint(
|
||||
["company_id"], ["a76.company.id"], name="fk_qclasses_company"
|
||||
),
|
||||
ForeignKeyConstraint(["class_id"], ["classes.id"], name="fk_qclasses_classes"),
|
||||
{"schema": "a24"},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user