From 262be8f165c372953eaf2986a08e34fdef554d4e Mon Sep 17 00:00:00 2001 From: qowevisa Date: Sat, 16 Nov 2024 20:31:52 +0200 Subject: [PATCH] Add Transfer interface --- src/lib/entities.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib/entities.ts b/src/lib/entities.ts index e850cde..37f5e47 100644 --- a/src/lib/entities.ts +++ b/src/lib/entities.ts @@ -35,11 +35,20 @@ export interface Expense { date: string; } +export interface Transfer { + id: number; + from_card_id: number; + to_card_id: number; + value: number; + date: string; +} + export const EntityTypes = { card: "Card", type: "Type", category: "Category", expense: "Expense", + transfer: "Transfer", } as const; export type EntityName = keyof typeof EntityTypes; @@ -48,6 +57,7 @@ export type EntityType = T extends "type" ? Type : T extends "category" ? Category : T extends "expense" ? Expense : + T extends "transfer" ? Transfer : never; //