"""租户主数据服务接口。""" from __future__ import annotations from abc import ABC, abstractmethod from typing import Any from fastapi_modules.fastapi_leaudit.domian.Dto.tenantDto import ( TenantCreateDTO, TenantStatusUpdateDTO, TenantUpdateDTO, ) class ITenantService(ABC): """租户主数据服务接口。""" @abstractmethod async def ListTenants(self, IncludeDisabled: bool = False) -> list[dict[str, Any]]: """返回租户完整列表。""" @abstractmethod async def ListTenantOptions(self, FeatureKey: str | None = None) -> list[dict[str, Any]]: """返回前端下拉所需精简租户列表。""" @abstractmethod async def GetTenant(self, TenantCode: str) -> dict[str, Any] | None: """返回单个租户详情。""" @abstractmethod async def GetTenantFeatures(self, TenantCode: str) -> list[str]: """返回单个租户启用的功能列表。""" @abstractmethod async def GetTenantAliases(self, TenantCode: str) -> list[str]: """返回单个租户别名列表。""" @abstractmethod async def CreateTenant(self, CurrentUserId: int, Body: TenantCreateDTO) -> dict[str, Any]: """创建租户。""" @abstractmethod async def UpdateTenant(self, CurrentUserId: int, TenantCode: str, Body: TenantUpdateDTO) -> dict[str, Any]: """更新租户。""" @abstractmethod async def UpdateTenantStatus(self, CurrentUserId: int, TenantCode: str, Body: TenantStatusUpdateDTO) -> dict[str, Any]: """更新租户启停状态。"""