81 lines
1.7 KiB
TypeScript
81 lines
1.7 KiB
TypeScript
export type Member = {
|
|
avatar: string;
|
|
name: string;
|
|
id: string;
|
|
};
|
|
|
|
export type BasicListItemDataType = {
|
|
id: string;
|
|
ownerId: string;
|
|
title: string;
|
|
avatar: string;
|
|
cover: string;
|
|
status: 'normal' | 'exception' | 'active' | 'success';
|
|
percent: number;
|
|
logo: string;
|
|
href: string;
|
|
body?: any;
|
|
updatedAt: number;
|
|
createdAt: number;
|
|
subDescription: string;
|
|
description: string;
|
|
activeUser: number;
|
|
newUser: number;
|
|
star: number;
|
|
like: number;
|
|
message: number;
|
|
content: string;
|
|
members: Member[];
|
|
};
|
|
export interface StoryType {
|
|
id?: number;
|
|
instanceId?: string;
|
|
title?: string;
|
|
description?: string;
|
|
status?: string;
|
|
createTime?: string;
|
|
ownerId?: string;
|
|
updatedId?: string;
|
|
updateTime?: string;
|
|
logo?: string;
|
|
}
|
|
export interface BaseResponse {
|
|
code: number;
|
|
message: string;
|
|
}
|
|
export interface ErrorResponse extends BaseResponse {
|
|
data: null;
|
|
code: -1,
|
|
message: "请求失败"
|
|
}
|
|
export interface StoryItem {
|
|
id?: number;
|
|
instanceId: string;
|
|
title: string;
|
|
storyInstanceId: string;
|
|
masterItemId?: string;
|
|
description: string;
|
|
storyItemTime: string; // YYYY-MM-DD
|
|
createTime: string; // YYYY-MM-DD
|
|
updateTime: string; // YYYY-MM-DD
|
|
location?: string;
|
|
coverInstanceId?: string; // 封面图
|
|
images?: string[]; // 多张图片
|
|
subItems?: StoryItem[];
|
|
isRoot: number;
|
|
}
|
|
export interface AddStoryItem extends StoryItem{
|
|
file: FormData;
|
|
}
|
|
export interface TimelineEvent {
|
|
id?: number;
|
|
title: string;
|
|
description: string;
|
|
date: string; // YYYY-MM-DD
|
|
time?: string; // HH:mm (可选)
|
|
location?: string;
|
|
cover?: string; // 封面图
|
|
images?: string[]; // 多张图片
|
|
subItems?: TimelineEvent[];
|
|
}
|