relation.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import type { IUser } from "./Auth";
  2. import type { ITerm } from "./Term";
  3. export interface IRelationRequest {
  4. id?: string;
  5. name: string;
  6. name_channel?: string;
  7. name_term?: ITerm;
  8. case?: string | null;
  9. from?: IFrom | null;
  10. to?: IFrom | null;
  11. match?: string[];
  12. category?: string;
  13. category_channel?: string;
  14. category_term?: ITerm;
  15. editor?: IUser;
  16. updated_at?: string;
  17. created_at?: string;
  18. }
  19. export interface IRelationListResponse {
  20. ok: boolean;
  21. message: string;
  22. data: {
  23. rows: IRelationRequest[];
  24. count: number;
  25. };
  26. }
  27. export interface IRelationResponse {
  28. ok: boolean;
  29. message: string;
  30. data: IRelationRequest;
  31. }
  32. export interface IFrom {
  33. spell?: string;
  34. case?: string[];
  35. }
  36. export interface IRelation {
  37. sn?: number;
  38. id?: string;
  39. name: string;
  40. name_channel?: string;
  41. name_term?: ITerm;
  42. case?: string | null;
  43. from?: IFrom | null;
  44. fromCase?: string[];
  45. fromSpell?: string;
  46. to?: IFrom | null;
  47. toCase?: string[];
  48. toSpell?: string;
  49. match?: string[];
  50. category?: string;
  51. category_channel?: string;
  52. category_term?: ITerm;
  53. editor?: IUser;
  54. updated_at?: string;
  55. created_at?: string;
  56. }