| 123456789101112131415161718 |
- from sqlalchemy import String, Text
- from sqlalchemy.dialects.sqlite import JSON
- from sqlalchemy.orm import Mapped, mapped_column
- from core_db import AuditMixin, Base, TenantMixin, VersionMixin
- from core_shared import JSONValue
- class TeamDefinition(TenantMixin, AuditMixin, VersionMixin, Base):
- __tablename__ = "team_definition"
- code: Mapped[str] = mapped_column(String(64), index=True)
- name: Mapped[str] = mapped_column(String(128))
- description: Mapped[str | None] = mapped_column(Text, nullable=True)
- team_type: Mapped[str] = mapped_column(String(32), default="collaborative")
- status: Mapped[str] = mapped_column(String(32), default="draft", index=True)
- owner_user_id: Mapped[str | None] = mapped_column(String(36), nullable=True)
- metadata_json: Mapped[dict[str, JSONValue] | None] = mapped_column(JSON, nullable=True)
|