feat(validation): complete validation editor and master data modules
This commit is contained in:
parent
2b5c765e41
commit
f73a24df13
73 changed files with 10194 additions and 0 deletions
26
validation-suite/backend/mercury/app/models/document.py
Normal file
26
validation-suite/backend/mercury/app/models/document.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import enum
|
||||
|
||||
from sqlalchemy import Enum, String
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.db.base import Base, TimestampMixin, UUIDMixin
|
||||
|
||||
|
||||
class DocumentOwnerType(str, enum.Enum):
|
||||
customer = "customer"
|
||||
device = "device"
|
||||
validation = "validation"
|
||||
equipment = "equipment"
|
||||
|
||||
|
||||
class Document(Base, UUIDMixin, TimestampMixin):
|
||||
__tablename__ = "documents"
|
||||
|
||||
owner_type: Mapped[DocumentOwnerType] = mapped_column(Enum(DocumentOwnerType), index=True)
|
||||
owner_id: Mapped[str] = mapped_column(String(80), index=True)
|
||||
filename: Mapped[str] = mapped_column(String(255))
|
||||
content_type: Mapped[str] = mapped_column(String(120))
|
||||
storage_path: Mapped[str] = mapped_column(String(500))
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue