19 lines
736 B
Python
19 lines
736 B
Python
"""平台基础信息(平台套件)。"""
|
|
from __future__ import annotations
|
|
|
|
from sqlalchemy import String
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.db.base import Base, TimestampMixin
|
|
|
|
|
|
class Platform(Base, TimestampMixin):
|
|
__tablename__ = "platform"
|
|
|
|
id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
|
|
code: Mapped[str] = mapped_column(String(64), nullable=False, unique=True)
|
|
name: Mapped[str] = mapped_column(String(64), nullable=False)
|
|
url: Mapped[str | None] = mapped_column(String(255), nullable=True)
|
|
description: Mapped[str | None] = mapped_column(String(255), nullable=True)
|
|
status: Mapped[str] = mapped_column(String(16), default="ACTIVE", nullable=False)
|