Dict.ts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. import { IStudio } from "../auth/Studio";
  2. import { IUser } from "../auth/User";
  3. import { ICaseListData } from "../dict/CaseList";
  4. export interface IDictRequest {
  5. id?: number;
  6. word: string;
  7. type?: string | null;
  8. grammar?: string | null;
  9. mean?: string | null;
  10. parent?: string | null;
  11. note?: string | null;
  12. factors?: string | null;
  13. factormean?: string | null;
  14. confidence: number;
  15. dict_id?: string;
  16. dict_name?: string;
  17. language?: string;
  18. creator_id?: number;
  19. editor?: IUser;
  20. studio?: IStudio;
  21. updated_at?: string;
  22. }
  23. export interface IUserDictCreate {
  24. data: string;
  25. view: string;
  26. }
  27. export interface IDictResponse {
  28. ok: boolean;
  29. message: string;
  30. data: number[];
  31. }
  32. export interface IDictInfo {
  33. id: string;
  34. name: string;
  35. shortname: string;
  36. }
  37. export interface IApiResponseDictData {
  38. id: string;
  39. word: string;
  40. type?: string | null;
  41. grammar?: string | null;
  42. mean?: string | null;
  43. parent?: string | null;
  44. note?: string | null;
  45. factors?: string | null;
  46. factormean?: string | null;
  47. language: string;
  48. dict?: IDictInfo;
  49. dict_id: string;
  50. dict_name?: string;
  51. dict_shortname?: string;
  52. shortname?: string;
  53. confidence: number;
  54. creator_id: number;
  55. updated_at: string;
  56. exp?: number;
  57. editor?: IUser;
  58. }
  59. export interface IApiResponseDict {
  60. ok: boolean;
  61. message: string;
  62. data: IApiResponseDictData;
  63. }
  64. export interface IApiResponseDictList {
  65. ok: boolean;
  66. message: string;
  67. data: {
  68. rows: IApiResponseDictData[];
  69. count: number;
  70. time?: number;
  71. };
  72. }
  73. export interface IVocabularyData {
  74. word: string;
  75. count: number;
  76. meaning?: string;
  77. }
  78. export interface IVocabularyListResponse {
  79. ok: boolean;
  80. message: string;
  81. data: {
  82. rows: IVocabularyData[];
  83. count: number;
  84. };
  85. }
  86. export interface IUserDictDeleteRequest {
  87. id: string;
  88. }
  89. export interface ICaseItem {
  90. word: string;
  91. case: ICaseListData[];
  92. count: number;
  93. }
  94. export interface ICaseListResponse {
  95. ok: boolean;
  96. message: string;
  97. data: {
  98. rows: ICaseItem[];
  99. count: number;
  100. };
  101. }
  102. export interface IFirstMeaning {
  103. word?: string;
  104. meaning?: string;
  105. }
  106. export interface IDictFirstMeaningResponse {
  107. ok: boolean;
  108. message: string;
  109. data: IFirstMeaning[];
  110. }