Initial project

This commit is contained in:
Timi
2025-07-08 16:33:11 +08:00
parent 1a5a16be74
commit f862530142
80 changed files with 8301 additions and 129 deletions
+79
View File
@@ -0,0 +1,79 @@
export enum RunEnv {
DEV = "DEV",
DEV_SSL = "DEV_SSL",
PROD = "PROD"
}
// 基本实体模型
export type Model = {
id?: number;
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> = {
from: string;
captcha: string;
data: T;
}
export enum CaptchaFrom {
LOGIN = "LOGIN",
REGISTER = "REGISTER",
/** 评论 */
COMMENT = "COMMENT",
/** 评论回复 */
COMMENT_REPLY = "COMMENT_REPLY",
/** Git 反馈 */
GIT_ISSUE = "GIT_ISSUE",
/** Git 合并请求 */
GIT_MERGE = "GIT_MERGE",
}
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;
}