2026-10-10 21:13:35 +08:00

40 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 应用层枚举(VARCHAR 存储 + TS 常量校验)。
* 取值与数据库列存储值一一对应,作为全项目唯一枚举源。
*/
export const CommonStatus = {
ENABLED: 'enabled',
DISABLED: 'disabled',
} as const;
export type CommonStatus = (typeof CommonStatus)[keyof typeof CommonStatus];
export const UserStatus = {
ENABLED: 'enabled',
DISABLED: 'disabled',
LOCKED: 'locked',
} as const;
export type UserStatus = (typeof UserStatus)[keyof typeof UserStatus];
export const ResourceType = {
MENU: 'menu',
BUTTON: 'button',
API: 'api',
} as const;
export type ResourceType = (typeof ResourceType)[keyof typeof ResourceType];
export const DataScope = {
ALL: 'all',
DEPT: 'dept',
DEPT_AND_CHILD: 'dept_and_child',
SELF: 'self',
CUSTOM: 'custom',
} as const;
export type DataScope = (typeof DataScope)[keyof typeof DataScope];
export const LoginStatus = {
SUCCESS: 'success',
FAIL: 'fail',
} as const;
export type LoginStatus = (typeof LoginStatus)[keyof typeof LoginStatus];