25 lines
711 B
TypeScript
25 lines
711 B
TypeScript
/** 通知(store_id=0 为全员广播) */
|
|
export default interface INotice {
|
|
id?: number;
|
|
store_id?: number;
|
|
/** order订单 price价格 system系统 */
|
|
type?: string;
|
|
title?: string;
|
|
content?: string;
|
|
data?: Record<string, unknown>;
|
|
is_read?: number;
|
|
read_at?: string;
|
|
created_at?: string;
|
|
}
|
|
|
|
export const NOTICE_TYPE_MAP: Record<string, { text: string; color: string }> = {
|
|
order: { text: '订单', color: 'blue' },
|
|
price: { text: '价格', color: 'gold' },
|
|
system: { text: '系统', color: 'default' },
|
|
};
|
|
|
|
export const NOTICE_READ_MAP: Record<number, { text: string; color: string }> = {
|
|
0: { text: '未读', color: 'warning' },
|
|
1: { text: '已读', color: 'default' },
|
|
};
|