fourcal-pms/backend/app/models/__init__.py

128 lines
3.9 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"""所有 ORM 模型集中导出,建表与 Alembic 式自检都看这个包。"""
from .base import Base, SoftDeleteMixin, TimestampMixin, money, percent, to_decimal
from .org import (
Account,
AccountIdentity,
AccountSource,
HubSyncRun,
LoginLog,
OperationLog,
OrgUnit,
Position,
SsoHandoff,
Status,
)
from .permission import (
FALLBACK_SCOPE,
Effect,
FieldScope,
PermAccountRole,
PermDataPolicy,
PermKind,
PermNode,
PermRole,
PermRoleNode,
ScopeType,
SubjectType,
)
from .project import (
Attachment,
Project,
ProjectMember,
ProjectMemberRole,
ProjectStage,
ProjectStageLog,
ProjectType,
ProjectVisibleRole,
SystemConfig,
UnderwrittenMode,
)
from .project import (
Certainty,
IndustryScene,
MilestoneStatus,
ProjectMilestone,
ProjectSource,
ProjectStageEvent,
SaleStage,
WbsTask,
WbsTaskStatus,
YesNo,
)
from .finance import (
BudgetFundMonth,
BudgetIncomeLine,
BudgetIncomePlanLine,
BudgetManageLine,
BudgetOtherCostLine,
BudgetPayPlanLine,
BudgetPurchaseLine,
CalcSnapshot,
CostFeeGroup,
CostType,
EstimateCostLine,
EstimateIncomeLine,
EstimateOtherLine,
EstimateManageType,
IncomeType,
ManageItemCode,
OtherCostBucket,
ProductCategory,
PurchaseType,
Revision,
RevisionModule,
RevisionStatus,
)
from .dictionary import DictItem, DictSource, DictType, DictValueType
from .approval import (
Action,
ApprovalDelegate,
ApprovalFlow,
ApprovalInstance,
ApprovalNode,
ApprovalRecord,
ApprovalTask,
BusinessModule,
CandidateType,
FlowStatus,
InstanceStatus,
NodeType,
SignType,
TaskStatus,
)
#: 建表顺序无关紧要(SQLAlchemy 会拓扑排序),列在这里方便自检脚本比对
ALL_MODELS = (
OrgUnit, Position, Account, AccountIdentity, HubSyncRun, SsoHandoff, LoginLog, OperationLog,
PermNode, PermRole, PermAccountRole, PermRoleNode, PermDataPolicy, FieldScope,
DictType, DictItem,
Project, ProjectMember, ProjectVisibleRole, ProjectStageLog, Attachment, SystemConfig,
ProjectMilestone, WbsTask, ProjectStageEvent,
Revision, CalcSnapshot,
EstimateIncomeLine, EstimateCostLine, EstimateOtherLine,
BudgetIncomeLine, BudgetIncomePlanLine, BudgetPurchaseLine, BudgetPayPlanLine,
BudgetManageLine, BudgetFundMonth, BudgetOtherCostLine,
ApprovalFlow, ApprovalNode, ApprovalInstance, ApprovalTask, ApprovalRecord, ApprovalDelegate,
)
__all__ = [
"Base", "ALL_MODELS", "Status", "AccountSource", "OrgUnit", "Position", "Account",
"AccountIdentity", "HubSyncRun", "SsoHandoff", "LoginLog", "OperationLog",
"PermKind", "PermNode", "PermRole", "PermAccountRole", "PermRoleNode", "PermDataPolicy",
"FieldScope", "ScopeType", "SubjectType", "Effect", "FALLBACK_SCOPE",
"DictType", "DictItem", "DictSource", "DictValueType",
"ProjectType", "ProjectStage", "UnderwrittenMode", "Project", "ProjectMember",
"ProjectMemberRole", "ProjectVisibleRole", "ProjectStageLog", "Attachment", "SystemConfig",
"Certainty", "YesNo", "IndustryScene", "SaleStage", "ProjectSource",
"ProjectMilestone", "MilestoneStatus", "WbsTask", "WbsTaskStatus", "ProjectStageEvent",
"Revision", "RevisionModule", "RevisionStatus", "CalcSnapshot",
"IncomeType", "PurchaseType", "CostFeeGroup", "CostType", "EstimateManageType",
"ManageItemCode", "ProductCategory", "OtherCostBucket", "EstimateIncomeLine", "EstimateCostLine", "EstimateOtherLine",
"BudgetIncomeLine", "BudgetIncomePlanLine", "BudgetPurchaseLine", "BudgetPayPlanLine",
"BudgetManageLine", "BudgetFundMonth", "BudgetOtherCostLine",
"BusinessModule", "NodeType", "SignType", "CandidateType", "FlowStatus", "InstanceStatus",
"Action", "TaskStatus", "ApprovalFlow", "ApprovalNode", "ApprovalInstance", "ApprovalTask",
"ApprovalRecord", "ApprovalDelegate", "money", "percent", "to_decimal",
]