Files
violin-home/src/entity/index.ts
T
simple321vip 024f306636 v2 refacting
2026-06-28 23:02:32 +08:00

73 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
type Customer = {
customerId: string,
account: string
}
type Theme = {
background: string,
activeBackground: string,
activeText: string,
normalText: string,
hoverBackground: string,
hoverText: string,
}
type DataTimeline = {
from: string,
title: string,
showDayAndMonth: boolean,
message: string,
}
// 与后端 CalendarEventResponse 对齐(camelCase
type Event = {
id?: number
customerId?: string
eventDate: string
title: string
eventInfo?: string
createdAt?: string
updatedAt?: string
}
interface Wiki {
bid: string
btId: string
title: string
blog_prex: string
autosave_control: string
content: string
order: number
}
const wiki = (data: any) => {
const { bid, btId, content, title, order } = data
return {
bid: bid,
btId: btId,
content: content,
title: title,
order: order
} as Wiki
}
interface WikiType {
btId: string
btName: string
blogs: Wiki[]
order: number
}
const wikiType = (data: any) => {
const { btId, btName, order } = data
return {
btId: btId,
btName: btName,
blogs: [],
order: order,
} as WikiType
}
export type { Customer, Theme, DataTimeline, Event, Wiki, WikiType }
export { wiki, wikiType }