feat(utils): add common utility functions and validation constants
This commit is contained in:
12
src/enums/common/dialog-enum.ts
Normal file
12
src/enums/common/dialog-enum.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* 通用对话框模式枚举
|
||||
* @description 定义对话框的操作模式(创建、编辑、查看)
|
||||
*/
|
||||
export enum DialogMode {
|
||||
/** 创建模式 - 新增数据 */
|
||||
CREATE = "create",
|
||||
/** 编辑模式 - 修改数据 */
|
||||
EDIT = "edit",
|
||||
/** 查看模式 - 只读展示 */
|
||||
VIEW = "view",
|
||||
}
|
||||
22
src/enums/common/status-enum.ts
Normal file
22
src/enums/common/status-enum.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* 通用状态枚举
|
||||
* 适用于大多数业务实体的启用/禁用状态
|
||||
*/
|
||||
export enum CommonStatus {
|
||||
/** 禁用 */
|
||||
DISABLED = 0,
|
||||
/** 启用 */
|
||||
ENABLED = 1,
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核状态枚举
|
||||
*/
|
||||
export enum AuditStatus {
|
||||
/** 待审核 */
|
||||
PENDING = 0,
|
||||
/** 已通过 */
|
||||
APPROVED = 1,
|
||||
/** 已拒绝 */
|
||||
REJECTED = 2,
|
||||
}
|
||||
@@ -8,4 +8,8 @@ export * from "./settings/theme-enum";
|
||||
export * from "./settings/locale-enum";
|
||||
export * from "./settings/device-enum";
|
||||
|
||||
export * from "./common/dialog-enum";
|
||||
export * from "./common/status-enum";
|
||||
|
||||
export * from "./system/menu-enum";
|
||||
export * from "./system/user-enum";
|
||||
|
||||
11
src/enums/system/user-enum.ts
Normal file
11
src/enums/system/user-enum.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* 用户性别枚举
|
||||
*/
|
||||
export enum UserGender {
|
||||
/** 未知 */
|
||||
UNKNOWN = 0,
|
||||
/** 男 */
|
||||
MALE = 1,
|
||||
/** 女 */
|
||||
FEMALE = 2,
|
||||
}
|
||||
Reference in New Issue
Block a user