Browse Source

add ICommentApiData

visuddhinanda 3 năm trước cách đây
mục cha
commit
fa6f500514
1 tập tin đã thay đổi với 15 bổ sung2 xóa
  1. 15 2
      dashboard/src/components/api/Comment.ts

+ 15 - 2
dashboard/src/components/api/Comment.ts

@@ -12,14 +12,27 @@ export interface ICommentRequest {
   updated_at?: string;
 }
 
+export interface ICommentApiData {
+  id: string;
+  res_id: string;
+  res_type: string;
+  title?: string;
+  content?: string;
+  parent?: string;
+  children_count: number;
+  editor: IUserRequest;
+  created_at?: string;
+  updated_at?: string;
+}
+
 export interface ICommentResponse {
   ok: boolean;
   message: string;
-  data: ICommentRequest;
+  data: ICommentApiData;
 }
 
 export interface ICommentListResponse {
   ok: boolean;
   message: string;
-  data: { rows: ICommentRequest[]; count: number };
+  data: { rows: ICommentApiData[]; count: number };
 }