init local code
This commit is contained in:
@@ -0,0 +1,261 @@
|
||||
/**
|
||||
* CMS 后端契约类型(与 com.yunhai.cms.model 一一对应,方案 §9.2 API 清单)。
|
||||
* 统一响应由 alova 封装解包:{code, msg, data} → code==0 返回 data。
|
||||
*/
|
||||
|
||||
/* ===== 登录态 ===== */
|
||||
|
||||
/** 当前角色(平台 BoaRoleInfo) */
|
||||
export interface CurrentRole {
|
||||
roleId?: number;
|
||||
roleName?: string;
|
||||
schId?: number;
|
||||
schName?: string;
|
||||
}
|
||||
|
||||
/** GET /api/auth/user 返回 */
|
||||
export interface AuthUserInfo {
|
||||
account: string;
|
||||
name: string;
|
||||
currentRole?: CurrentRole;
|
||||
superAdmin: boolean;
|
||||
roleIds?: number[];
|
||||
}
|
||||
|
||||
/** 站点(SiteVo) */
|
||||
export interface SiteVo {
|
||||
id: number;
|
||||
code: string;
|
||||
/** 上级站点ID(0=顶层校站点;院系子站挂主站 id) */
|
||||
parentSiteId?: number;
|
||||
/** 上级站点名称(列表展示用,服务端装配) */
|
||||
parentName?: string;
|
||||
schId?: number;
|
||||
schName?: string;
|
||||
name: string;
|
||||
theme?: string;
|
||||
/** 站点配置 JSON 原文(logo/联系方式/页脚/domain/public_base_url) */
|
||||
configJson?: string;
|
||||
status: number;
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/** layout 使用的当前站点精简态 */
|
||||
export interface CurrentSite {
|
||||
id: number;
|
||||
code: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
/** 学校上下文精简态(docs/09 §3.3:学校卡片 = 顶层站点,URL 段用主站编码) */
|
||||
export interface CurrentSchool {
|
||||
schId?: number;
|
||||
schName?: string;
|
||||
mainSiteId: number;
|
||||
mainSiteCode: string;
|
||||
mainSiteName: string;
|
||||
}
|
||||
|
||||
/** 学校工作台卡片(SchoolVo) */
|
||||
export interface SchoolCard {
|
||||
schId?: number;
|
||||
schName?: string;
|
||||
mainSiteId: number;
|
||||
mainSiteCode: string;
|
||||
mainSiteName: string;
|
||||
theme?: string;
|
||||
siteCount: number;
|
||||
articleCount: number;
|
||||
status: number;
|
||||
}
|
||||
|
||||
/** UserBase 学校选项(添加学校选择器) */
|
||||
export interface SchoolOption {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
/* ===== 栏目 ===== */
|
||||
|
||||
/** 栏目树节点(CategoryTreeNode) */
|
||||
export interface CategoryTreeNode {
|
||||
id?: number;
|
||||
parentId: number;
|
||||
siteId?: number;
|
||||
name: string;
|
||||
/** 1=文章列表 2=单页 3=外链 */
|
||||
type: number;
|
||||
linkUrl?: string;
|
||||
template?: string;
|
||||
/** 单页内容(type=2) */
|
||||
content?: string;
|
||||
sortNo: number;
|
||||
seoTitle?: string;
|
||||
seoDescription?: string;
|
||||
status: number;
|
||||
children: CategoryTreeNode[];
|
||||
}
|
||||
|
||||
/* ===== 文章 ===== */
|
||||
|
||||
/** 文章分页行(ArticlePageItem) */
|
||||
export interface ArticlePageItem {
|
||||
id: number;
|
||||
siteId: number;
|
||||
categoryId: number;
|
||||
categoryName?: string;
|
||||
title: string;
|
||||
summary?: string;
|
||||
coverImage?: string;
|
||||
/** 0=草稿 1=已发布 2=已下架 */
|
||||
status: number;
|
||||
topmost: number;
|
||||
publishTime?: string;
|
||||
offlineTime?: string;
|
||||
viewCount: number;
|
||||
createTime?: string;
|
||||
createBy?: string;
|
||||
}
|
||||
|
||||
/** 文章编辑回显(ArticleEditVo) */
|
||||
export interface ArticleEditVo {
|
||||
id: number;
|
||||
siteId: number;
|
||||
categoryId: number;
|
||||
title: string;
|
||||
summary?: string;
|
||||
content?: string;
|
||||
coverImage?: string;
|
||||
authorName?: string;
|
||||
source?: string;
|
||||
status: number;
|
||||
topmost: number;
|
||||
publishTime?: string;
|
||||
offlineTime?: string;
|
||||
extJson?: string;
|
||||
}
|
||||
|
||||
/** 文章保存入参(ArticleSaveRequest) */
|
||||
export interface ArticleSaveRequest {
|
||||
id?: number;
|
||||
siteId: number;
|
||||
categoryId: number;
|
||||
title: string;
|
||||
summary?: string;
|
||||
content?: string;
|
||||
coverImage?: string;
|
||||
authorName?: string;
|
||||
source?: string;
|
||||
topmost?: number;
|
||||
/** 定时发布时间(空=不指定) */
|
||||
publishTime?: string;
|
||||
offlineTime?: string;
|
||||
/** 微信预留开关(本期后端不消费) */
|
||||
syncWechat?: boolean;
|
||||
/** 本次编辑上传的附件 id */
|
||||
attachmentIds?: number[];
|
||||
}
|
||||
|
||||
/** 文章分页查询(ArticlePageQuery) */
|
||||
export interface ArticlePageQuery {
|
||||
siteId: number;
|
||||
categoryId?: number;
|
||||
status?: number;
|
||||
keyword?: string;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
/* ===== 附件 ===== */
|
||||
|
||||
/** 附件(AttachmentVo) */
|
||||
export interface AttachmentVo {
|
||||
id: number;
|
||||
siteId: number;
|
||||
articleId?: number;
|
||||
fileName: string;
|
||||
url: string;
|
||||
fileSize?: number;
|
||||
mimeType?: string;
|
||||
createTime?: string;
|
||||
orphan: boolean;
|
||||
}
|
||||
|
||||
/* ===== 轮播 ===== */
|
||||
|
||||
/** 轮播(BannerVo) */
|
||||
export interface BannerVo {
|
||||
id?: number;
|
||||
siteId: number;
|
||||
position: string;
|
||||
title: string;
|
||||
imageUrl: string;
|
||||
/** 1=文章 2=栏目 3=外链 */
|
||||
linkType: number;
|
||||
linkValue?: string;
|
||||
sortNo: number;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
status: number;
|
||||
}
|
||||
|
||||
/* ===== 友链 ===== */
|
||||
|
||||
/** 友链(LinkVo) */
|
||||
export interface LinkVo {
|
||||
id?: number;
|
||||
siteId: number;
|
||||
groupName: string;
|
||||
name: string;
|
||||
logoUrl?: string;
|
||||
linkUrl: string;
|
||||
sortNo: number;
|
||||
status: number;
|
||||
}
|
||||
|
||||
/* ===== 通用 ===== */
|
||||
|
||||
/** 删除入参(DeleteRequest) */
|
||||
export interface DeleteRequest {
|
||||
id: number;
|
||||
siteId: number;
|
||||
}
|
||||
|
||||
/** 后端分页包装 {total, list} */
|
||||
export interface PageResult<T> {
|
||||
total: number;
|
||||
list: T[];
|
||||
}
|
||||
|
||||
/* ===== 主题 ===== */
|
||||
|
||||
/** theme.json 可调参数选项(select 类型) */
|
||||
export interface ThemeParamOption {
|
||||
value: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
/** 主题包参数 schema(ThemeParam) */
|
||||
export interface ThemeParamVo {
|
||||
key: string;
|
||||
/** 聚合进 :root{} 的 CSS 变量名(仅 color 类型有) */
|
||||
cssVar?: string;
|
||||
label: string;
|
||||
/** color / image / select / text */
|
||||
type: string;
|
||||
defaultValue?: string;
|
||||
options?: ThemeParamOption[];
|
||||
}
|
||||
|
||||
/** 主题包(ThemeVo,GET /api/theme/list) */
|
||||
export interface ThemeVo {
|
||||
name: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
version?: string;
|
||||
author?: string;
|
||||
bannerSize?: string;
|
||||
/** 预览图(管理端资产代理 /api/theme/{name}/asset/screenshot.png) */
|
||||
screenshotUrl: string;
|
||||
params: ThemeParamVo[];
|
||||
}
|
||||
Reference in New Issue
Block a user