Comment.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import { IUser } from "../auth/User";
  2. import { TContentType } from "../discussion/DiscussionCreate";
  3. import { TResType } from "../discussion/DiscussionListCard";
  4. export interface ICommentRequest {
  5. id?: string;
  6. res_id?: string;
  7. res_type?: string;
  8. title?: string;
  9. content?: string;
  10. content_type?: TContentType;
  11. parent?: string;
  12. tpl_id?: string;
  13. status?: "active" | "close";
  14. editor?: IUser;
  15. created_at?: string;
  16. updated_at?: string;
  17. }
  18. export interface ICommentApiData {
  19. id: string;
  20. res_id: string;
  21. res_type: TResType;
  22. title?: string;
  23. content?: string;
  24. content_type?: TContentType;
  25. html?: string;
  26. parent?: string;
  27. tpl_id?: string;
  28. status?: "active" | "close";
  29. children_count?: number;
  30. editor: IUser;
  31. created_at?: string;
  32. updated_at?: string;
  33. }
  34. export interface ICommentResponse {
  35. ok: boolean;
  36. message: string;
  37. data: ICommentApiData;
  38. }
  39. export interface ICommentListResponse {
  40. ok: boolean;
  41. message: string;
  42. data: {
  43. rows: ICommentApiData[];
  44. count: number;
  45. active: number;
  46. close: number;
  47. };
  48. }
  49. export interface ICommentAnchorResponse {
  50. ok: boolean;
  51. message: string;
  52. data: string;
  53. }