瀏覽代碼

type 使用 TChannelType

visuddhinanda 3 年之前
父節點
當前提交
8082c6cbe4
共有 1 個文件被更改,包括 18 次插入3 次删除
  1. 18 3
      dashboard/src/components/api/Corpus.ts

+ 18 - 3
dashboard/src/components/api/Corpus.ts

@@ -1,6 +1,8 @@
+import { IStudio } from "../auth/StudioName";
 import { IUser } from "../auth/User";
 import { IUser } from "../auth/User";
 import { IChannel } from "../channel/Channel";
 import { IChannel } from "../channel/Channel";
-import { TagNode } from "../tag/TagArea";
+import { TChannelType } from "./Channel";
+import { TagNode } from "./Tag";
 
 
 export interface IApiPaliChapterList {
 export interface IApiPaliChapterList {
   id: string;
   id: string;
@@ -59,7 +61,7 @@ export interface IApiChapterChannels {
   views: number;
   views: number;
   likes: number[];
   likes: number[];
   channel: {
   channel: {
-    type: string;
+    type: TChannelType;
     owner_uid: string;
     owner_uid: string;
     editor_id: number;
     editor_id: number;
     name: string;
     name: string;
@@ -70,6 +72,7 @@ export interface IApiChapterChannels {
     updated_at: string;
     updated_at: string;
     uid: string;
     uid: string;
   };
   };
+  studio: IStudio;
 }
 }
 
 
 export interface IApiResponseChapterChannelList {
 export interface IApiResponseChapterChannelList {
@@ -94,7 +97,7 @@ export interface IApiResponseChannelListData {
   count: number;
   count: number;
   channel: {
   channel: {
     id: number;
     id: number;
-    type: string;
+    type: TChannelType;
     owner_uid: string;
     owner_uid: string;
     editor_id: number;
     editor_id: number;
     name: string;
     name: string;
@@ -106,6 +109,7 @@ export interface IApiResponseChannelListData {
     updated_at: string;
     updated_at: string;
     uid: string;
     uid: string;
   };
   };
+  studio: IStudio;
 }
 }
 export interface IApiResponseChannelList {
 export interface IApiResponseChannelList {
   ok: boolean;
   ok: boolean;
@@ -168,6 +172,7 @@ export interface IChapterData {
   path: string;
   path: string;
   tags: TagNode[];
   tags: TagNode[];
   channel: { name: string; owner_uid: string };
   channel: { name: string; owner_uid: string };
+  studio: IStudio;
   channel_id: string;
   channel_id: string;
   summary: string;
   summary: string;
   view: number;
   view: number;
@@ -182,3 +187,13 @@ export interface IChapterListResponse {
   message: string;
   message: string;
   data: { rows: IChapterData[]; count: number };
   data: { rows: IChapterData[]; count: number };
 }
 }
+
+export interface ILangList {
+  lang: string;
+  count: number;
+}
+export interface IChapterLangListResponse {
+  ok: boolean;
+  message: string;
+  data: { rows: ILangList[]; count: number };
+}