2
0

Term.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. import type { IStudio } from "../auth/Studio"
  2. import type { IUser } from "../auth/User"
  3. import type { IChannel } from "../channel/Channel"
  4. import type { TRole } from "./Auth"
  5. export interface ITermDataRequest {
  6. id?: string;
  7. word: string;
  8. tag?: string;
  9. meaning: string;
  10. other_meaning?: string;
  11. note?: string;
  12. channel?: string;
  13. studioName?: string;
  14. studioId?: string;
  15. language?: string;
  16. parent_channel_id?: string;
  17. save_as?: boolean;
  18. copy_channel?: string;
  19. copy_lang?: string;
  20. pr?: boolean;
  21. }
  22. export interface ITermDataResponse {
  23. id: number;
  24. guid: string;
  25. word: string;
  26. tag: string;
  27. meaning: string;
  28. other_meaning: string;
  29. note: string | null;
  30. html?: string;
  31. channal: string;
  32. channel?: IChannel;
  33. studio: IStudio;
  34. editor: IUser;
  35. role?: TRole;
  36. exp?: number;
  37. language: string;
  38. community?: boolean;
  39. summary?: string;
  40. summary_is_community?: boolean;
  41. created_at: string;
  42. updated_at: string;
  43. }
  44. export interface ITermResponse {
  45. ok: boolean;
  46. message: string;
  47. data: ITermDataResponse;
  48. }
  49. export interface ITermListResponse {
  50. ok: boolean;
  51. message: string;
  52. data: {
  53. rows: ITermDataResponse[];
  54. count: number;
  55. };
  56. }
  57. interface IMeaningCount {
  58. meaning: string;
  59. count: number;
  60. }
  61. interface IStudioChannel {
  62. name: string;
  63. uid: string;
  64. }
  65. export interface ITermCreate {
  66. word: string;
  67. meaningCount: IMeaningCount[];
  68. studioChannels: IStudioChannel[];
  69. language: string;
  70. studio: IStudio;
  71. }
  72. export interface ITermCreateResponse {
  73. ok: boolean;
  74. message: string;
  75. data: ITermCreate;
  76. }
  77. export interface ITermDeleteRequest {
  78. uuid: boolean;
  79. id: string[];
  80. }