adding part colour

This commit is contained in:
Ian Roddis committed 2026-07-02 12:34:33 -03:00
1 parent 422e217180
commit 2e7002b73b
14 files changed
+379 -2

No files matched your search

+2
View File
@@ -6,6 +6,7 @@ from app.models.imported_part import ImportedPart
from app.models.imported_part_config import ImportedPartConfig
from app.models.iso_thread import IsoThread
from app.models.manufacturer import Manufacturer
from app.models.part_colour import PartColour
from app.models.part_type import PartType
from app.models.permission import Permission
from app.models.scope_model import ScopeModel
@@ -22,6 +23,7 @@ __all__ = [
"ImportedPartConfig",
"IsoThread",
"Manufacturer",
"PartColour",
"PartType",
"Permission",
"ScopeModel",
+12
View File
@@ -0,0 +1,12 @@
from sqlalchemy import UniqueConstraint
from sqlalchemy.orm import Mapped, mapped_column
from app.core.database import Base
class PartColour(Base):
__tablename__ = "part_colours"
__table_args__ = (UniqueConstraint("name"),)
id: Mapped[int] = mapped_column(primary_key=True)
name: Mapped[str] = mapped_column(nullable=False)