from api.v1.common.base_models import TenantScopedMixin, TimestampMixin
from core.database import Base
from sqlalchemy import (
    Integer,
    PrimaryKeyConstraint,
    String,
    UniqueConstraint,
)
from sqlalchemy.orm import Mapped, mapped_column


class Seal(Base, TenantScopedMixin, TimestampMixin):
    __tablename__ = "seal"
    __table_args__ = (
        PrimaryKeyConstraint("id", name="seal_pkey"),
        UniqueConstraint("tenant_id", "company_id", "seal", name="seal_ukey"),
        {"schema": "a76"},
    )

    id: Mapped[int] = mapped_column(Integer, primary_key=True)

    seal: Mapped[str] = mapped_column(String(15))
