Files
jczxw-pc/app/api/app/notification/model.ts
2026-04-23 16:30:57 +08:00

61 lines
1.5 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.

import type { PageParam } from '@/api'
/** 通知类型枚举 */
export type NotificationType = 'ticket' | 'review' | 'system' | 'resource' | 'permission' | 'member' | 'payment'
/** 通知实体 */
export interface Notification {
/** 通知 ID */
id?: number
/** 接收用户 ID */
userId?: number
/** 通知类型 */
type?: NotificationType
/** 通知标题 */
title?: string
/** 通知内容摘要 */
content?: string
/** 是否已读0 未读1 已读 */
isRead?: number
/** 关联业务 ID如工单ID、权限申请ID等 */
refId?: number
/** 关联业务类型(如 ticket、permission_request 等) */
refType?: string
/** 跳转链接 */
linkUrl?: string
/** 发送者 ID系统通知为 0 */
senderId?: number
/** 发送者名称 */
senderName?: string
/** 发送者头像 */
senderAvatar?: string
/** 租户 ID */
tenantId?: number
/** 创建时间 */
createTime?: string
/** 更新时间(标记已读时间) */
updateTime?: string
}
/** 通知查询参数 */
export interface NotificationParam extends PageParam {
/** 通知类型筛选 */
type?: NotificationType | ''
/** 是否已读0 未读1 已读,不传查全部 */
isRead?: number
}
/** 未读统计 */
export interface UnreadCountResult {
/** 总未读数 */
total?: number
/** 各类型未读数 */
ticket?: number
review?: number
system?: number
resource?: number
permission?: number
member?: number
payment?: number
}