Add Transfer interface

This commit is contained in:
qowevisa 2024-11-16 20:31:52 +02:00
parent 8c389f7c69
commit 262be8f165

View File

@ -35,11 +35,20 @@ export interface Expense {
date: string; date: string;
} }
export interface Transfer {
id: number;
from_card_id: number;
to_card_id: number;
value: number;
date: string;
}
export const EntityTypes = { export const EntityTypes = {
card: "Card", card: "Card",
type: "Type", type: "Type",
category: "Category", category: "Category",
expense: "Expense", expense: "Expense",
transfer: "Transfer",
} as const; } as const;
export type EntityName = keyof typeof EntityTypes; export type EntityName = keyof typeof EntityTypes;
@ -48,6 +57,7 @@ export type EntityType<T extends EntityName> =
T extends "type" ? Type : T extends "type" ? Type :
T extends "category" ? Category : T extends "category" ? Category :
T extends "expense" ? Expense : T extends "expense" ? Expense :
T extends "transfer" ? Transfer :
never; never;
// //