init project
This commit is contained in:
60
src/types/Model.ts
Normal file
60
src/types/Model.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
export enum RunEnv {
|
||||
DEV = "DEV",
|
||||
DEV_SSL = "DEV_SSL",
|
||||
PROD = "PROD"
|
||||
}
|
||||
|
||||
// 基本实体模型
|
||||
export type Model = {
|
||||
id?: string;
|
||||
|
||||
createdAt?: number;
|
||||
updatedAt?: number;
|
||||
deletedAt?: number;
|
||||
}
|
||||
|
||||
export type Response = {
|
||||
code: number;
|
||||
msg?: string;
|
||||
data: object;
|
||||
}
|
||||
|
||||
export type Page = {
|
||||
index: number;
|
||||
size: number;
|
||||
keyword?: string;
|
||||
orderMap?: { [key: string]: OrderType };
|
||||
}
|
||||
|
||||
export enum OrderType {
|
||||
ASC = "ASC",
|
||||
DESC = "DESC"
|
||||
}
|
||||
|
||||
export type PageResult<T> = {
|
||||
total: number;
|
||||
list: T[];
|
||||
}
|
||||
|
||||
// 携带验证码的请求体
|
||||
export type CaptchaData<T> = {
|
||||
captchaId?: string;
|
||||
captcha?: string;
|
||||
data?: T;
|
||||
}
|
||||
|
||||
export enum ImageType {
|
||||
AUTO = "ir-auto",
|
||||
SMOOTH = "ir-smooth",
|
||||
PIXELATED = "ir-pixelated"
|
||||
}
|
||||
|
||||
export type KeyValue<T> = {
|
||||
key: string;
|
||||
value: T;
|
||||
}
|
||||
|
||||
export type LabelValue<T> = {
|
||||
label: string;
|
||||
value: T;
|
||||
}
|
||||
Reference in New Issue
Block a user