first version
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/** 通知(user_id=0 为全员广播) */
|
||||
export default interface INotice {
|
||||
id?: number;
|
||||
user_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' },
|
||||
};
|
||||
Reference in New Issue
Block a user