重构
This commit is contained in:
14
src/shared/constant.ts
Normal file
14
src/shared/constant.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export const LENGTH_MAX_DICTIONARY_TEXT = 30;
|
||||
export const LENGTH_MIN_DICTIONARY_TEXT = 1;
|
||||
|
||||
export const LENGTH_MAX_LANGUAGE = 20;
|
||||
export const LENGTH_MIN_LANGUAGE = 1;
|
||||
|
||||
export const LENGTH_MAX_PAIR_TEXT = 50;
|
||||
export const LENGTH_MIN_PAIR_TEXT = 1;
|
||||
|
||||
export const LENGTH_MAX_IPA = 150;
|
||||
export const LENGTH_MIN_IPA = 1;
|
||||
|
||||
export const LENGTH_MAX_FOLDER_NAME = 20;
|
||||
export const LENGTH_MIN_FOLDER_NAME = 1;
|
||||
@@ -1,3 +0,0 @@
|
||||
export type TSharedPair = {
|
||||
|
||||
};
|
||||
23
src/shared/folder-type.ts
Normal file
23
src/shared/folder-type.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
export type TSharedFolder = {
|
||||
id: number,
|
||||
name: string,
|
||||
userId: string;
|
||||
};
|
||||
|
||||
export type TSharedFolderWithTotalPairs = {
|
||||
id: number,
|
||||
name: string,
|
||||
userId: string,
|
||||
total: number;
|
||||
};
|
||||
|
||||
export type TSharedPair = {
|
||||
text1: string;
|
||||
text2: string;
|
||||
language1: string;
|
||||
language2: string;
|
||||
ipa1: string | null;
|
||||
ipa2: string | null;
|
||||
id: number;
|
||||
folderId: number;
|
||||
};
|
||||
Reference in New Issue
Block a user