Files
LaiToolManagementSystem/src/services/enum/dataInfo.ts
T

36 lines
786 B
TypeScript
Raw Normal View History

2025-05-15 14:05:03 +08:00
export enum DataInfoTypeEnum {
/**
* Discord
*/
Discord = "Discord",
}
/**
* Maps a numeric index to a MachineAuthorizationType key-value pair
* @param index The numeric index to map
* @returns An object with the enum key and its corresponding value
*/
export function GetDataInfoTypeOption(index: number): string {
const keys = Object.keys(DataInfoTypeEnum);
switch (index) {
case 0:
return DataInfoTypeEnum[keys[0] as keyof typeof DataInfoTypeEnum];
default:
return DataInfoTypeEnum[keys[0] as keyof typeof DataInfoTypeEnum];
}
}
/**
* 获取MachineAuthorizationType的选项
* @returns
*/
export function GetDataInfoTypeOptions(): { label: string, value: number }[] {
return [
{
label: "Discord",
value: 0
}
]
}