Refactor code structure and remove redundant changes

This commit is contained in:
wangqiao
2025-08-15 16:45:15 +08:00
commit 99df1d1f81
220 changed files with 33086 additions and 0 deletions

160
api/upnew/types.ts Normal file
View File

@ -0,0 +1,160 @@
// 定义 files 数组中每个元素的类型
export interface FileItem {
id: number
title: string
drawId: number
type: number
url: string
sort: number
}
// 定义整个 JSON 对象的类型
export interface TcreateReq {
activeName: string
id: number | string
type: any[]
isDomestic: number | string
province: string // 省份编码
city: string // 城市编码
county: string // 区县编码
draws: TcreateDrawsReq[]
}
export interface TcreateDrawsReq {
id: number | string
projectId: number | string
title: string
description: string
ownedUserId: string
editions: string
labels: any[]
type: number
source: number | string
editType: boolean | string
status: any
createAddress: string
createIp: string
files: FileItem[]
province: string // 省份编码
city: string // 城市编码
county: string // 区县编码
points: number | undefined // 金币
projectType: any[] // 项目类型
formatType: any[] // 格式类型
coverImages: any[] // 封面图片
otherFiles: any[] // 附件信息
renderings: any[] // 效果图
}
export interface pageReq {
pageNo?: number
pageSize?: number
projectId?: number | string
title?: string
ownedUserId?: string
editions?: string
labels?: any[]
type?: number // 类型: 1 图纸 2 文本 3 模型
source?: number | string
editType?: boolean | string
status?: any
createAddress?: string
createIp?: string
projectType?: string
}
export interface pageRes {
list: {
id?: number
projectId?: number
title?: string
editions?: string[]
ownedUserIdInfo?: any
type?: number
createTime?: string
projectType?: string[]
status?: number
recommend?: boolean
points?: number
iconUrl?: string
previewPoint?: number
commentsPoint?: number
hotPoint?: number
}[]
total: number
}
export interface recommendTopReq {
/** 类型: 1 图纸 2 文本 3 模型 */
type: number
/** 项目分类 */
projectType: number
/** 是否国内 0 国外 1 国内 */
isDomestic: number
}
export interface recommendTopRes {
/** 主键 */
id: number
/** 项目id */
projectId: number
/** 标题 */
title: string
/** 版本 */
editions: any[]
/** 类型: 1 图纸 2 文本 3 模型 */
type: number
/** 创建时间 */
createTime: string
/** 项目分类 */
projectType: any[]
/** 状态 */
status: number
/** 是否推荐 */
recommend: boolean
/** 金币 */
points: number
/** 封面图片 */
iconUrl: string
/** 热度 */
hotPoint: number
}
/**
* 获取具有上下级的字典信息
*/
export interface parentRes {
/** 主键 */
id: number
/** 名称 */
name: string
/** 父级id */
parentId: number
/** 类型 */
type: number
/** 是否子级 */
isChildren: boolean
}
/**
* 首页-标签
*/
export interface ProjectDictNodeVO {
id: string
parentId: string
name: string
isChildren: boolean
sort: number
children: {
id: string
parentId: string
name: string
isChildren: boolean
sort: number
children: {
id: string
parentId: string
name: string
isChildren: boolean
sort: number
}[]
}[]
}