15 lines
541 B
Python
15 lines
541 B
Python
"""集成配置表"""
|
|
from .base import Base
|
|
from .types import JSONB
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
from sqlalchemy import BigInteger, Integer, VARCHAR, Boolean
|
|
|
|
|
|
class Integration(Base):
|
|
__tablename__ = "integrations"
|
|
|
|
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
|
type: Mapped[str] = mapped_column(VARCHAR(100), nullable=False)
|
|
config: Mapped[dict] = mapped_column(JSONB, nullable=False)
|
|
is_active: Mapped[bool] = mapped_column(Boolean, nullable=False, default=True)
|