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