import type { PageParam } from '@/api/index';

/** 通知类型 */
export type NotificationType = 'ticket' | 'review' | 'system' | 'resource' | 'permission' | 'member' | 'payment';

/** 通知实体 */
export interface Notification {
  id?: number;
  userId?: number;
  type?: NotificationType;
  title?: string;
  content?: string;
  isRead?: number;
  refId?: number;
  refType?: string;
  linkUrl?: string;
  senderId?: number;
  senderName?: string;
  senderAvatar?: string;
  tenantId?: number;
  createTime?: string;
  updateTime?: string;
}

/** 通知查询参数 */
export interface NotificationParam extends PageParam {
  type?: NotificationType | '';
  isRead?: number;
}

/** 未读统计 */
export interface UnreadCountResult {
  total?: number;
  ticket?: number;
  review?: number;
  system?: number;
  resource?: number;
  permission?: number;
  member?: number;
  payment?: number;
}
