14 lines
470 B
Python
14 lines
470 B
Python
"""租户模型"""
|
|
from .base import BaseNoTenant
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
from sqlalchemy import BigInteger, Integer, VARCHAR
|
|
from typing import Optional
|
|
|
|
|
|
class Tenant(BaseNoTenant):
|
|
__tablename__ = "tenants"
|
|
|
|
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
|
name: Mapped[str] = mapped_column(VARCHAR(255), nullable=False)
|
|
domain: Mapped[Optional[str]] = mapped_column(VARCHAR(255), nullable=True)
|