Comment.ts 943 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { TContentType } from "../comment/CommentCreate";
  2. import { IUserApiData } from "./Auth";
  3. export interface ICommentRequest {
  4. id?: string;
  5. res_id?: string;
  6. res_type?: string;
  7. title?: string;
  8. content?: string;
  9. content_type?: TContentType;
  10. parent?: string;
  11. editor?: IUserApiData;
  12. created_at?: string;
  13. updated_at?: string;
  14. }
  15. export interface ICommentApiData {
  16. id: string;
  17. res_id: string;
  18. res_type: string;
  19. title?: string;
  20. content?: string;
  21. content_type?: TContentType;
  22. parent?: string;
  23. children_count: number;
  24. editor: IUserApiData;
  25. created_at?: string;
  26. updated_at?: string;
  27. }
  28. export interface ICommentResponse {
  29. ok: boolean;
  30. message: string;
  31. data: ICommentApiData;
  32. }
  33. export interface ICommentListResponse {
  34. ok: boolean;
  35. message: string;
  36. data: { rows: ICommentApiData[]; count: number };
  37. }
  38. export interface ICommentAnchorResponse {
  39. ok: boolean;
  40. message: string;
  41. data: string;
  42. }