45 lines
709 B
TypeScript
45 lines
709 B
TypeScript
// 基本实体模型
|
|
export type Model = {
|
|
id?: number;
|
|
|
|
createdAt?: number;
|
|
updatedAt?: number;
|
|
deletedAt?: number;
|
|
}
|
|
|
|
export type Response = {
|
|
code: number;
|
|
msg?: string;
|
|
data: object;
|
|
}
|
|
|
|
export type QueryPage = {
|
|
index: number;
|
|
size: number;
|
|
orderMap?: { [key: string]: OrderType };
|
|
equalsExample?: { [key: string]: string | undefined | null };
|
|
likeExample?: { [key: string]: string | undefined | null };
|
|
}
|
|
|
|
export enum OrderType {
|
|
ASC = "ASC",
|
|
DESC = "DESC"
|
|
}
|
|
|
|
export type QueryPageResult<T> = {
|
|
total: number;
|
|
list: T[];
|
|
}
|
|
|
|
// 携带验证码的请求体
|
|
export type CaptchaData<T> = {
|
|
from: string;
|
|
captcha: string;
|
|
data: T;
|
|
}
|
|
|
|
export type KeyValue<T> = {
|
|
key: string;
|
|
value: T;
|
|
}
|