Add Currency interface to entities

This commit is contained in:
qowevisa 2024-11-20 21:00:48 +02:00
parent 35726ae43f
commit a55c7fb139

View File

@ -103,6 +103,13 @@ export interface Metric {
short: string; short: string;
} }
export interface Currency {
id: number;
name: string;
iso_name: string;
symbol: string;
}
export const EntityTypes = { export const EntityTypes = {
card: "Card", card: "Card",
type: "Type", type: "Type",
@ -112,6 +119,7 @@ export const EntityTypes = {
transfer: "Transfer", transfer: "Transfer",
payment: "Payment", payment: "Payment",
metric: "Metric", metric: "Metric",
currency: "Currency",
} as const; } as const;
export type EntityName = keyof typeof EntityTypes; export type EntityName = keyof typeof EntityTypes;
@ -124,6 +132,7 @@ export type EntityType<T extends EntityName> =
T extends "transfer" ? Transfer : T extends "transfer" ? Transfer :
T extends "payment" ? Payment : T extends "payment" ? Payment :
T extends "metric" ? Metric : T extends "metric" ? Metric :
T extends "currency" ? Currency :
never; never;
// //