notification.ts 809 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import type { IUser } from "../auth/User"
  2. import type { IChannel } from "../channel/Channel"
  3. export interface INotificationPutResponse {
  4. ok: boolean;
  5. data: {
  6. unread: number;
  7. };
  8. message: string;
  9. }
  10. export interface INotificationListResponse {
  11. ok: boolean;
  12. data: INotificationListData;
  13. message: string;
  14. }
  15. export interface INotificationListData {
  16. rows: INotificationData[];
  17. count: number;
  18. unread: number;
  19. }
  20. interface INotificationData {
  21. id: string;
  22. from: IUser;
  23. to: IUser;
  24. channel: IChannel;
  25. url?: string;
  26. title?: string;
  27. book_title?: string;
  28. content: string;
  29. content_type: string;
  30. res_type: string;
  31. res_id: string;
  32. status: string;
  33. deleted_at?: string;
  34. created_at: string;
  35. updated_at: string;
  36. }
  37. export interface INotificationRequest {
  38. status: string;
  39. }