From 37cf8f26148ca1370d522928b17ee2d09357c34e Mon Sep 17 00:00:00 2001 From: qowevisa Date: Tue, 19 Nov 2024 10:09:52 +0200 Subject: [PATCH] Add Income interface --- src/lib/entities.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib/entities.ts b/src/lib/entities.ts index 37f5e47..841baac 100644 --- a/src/lib/entities.ts +++ b/src/lib/entities.ts @@ -35,6 +35,14 @@ export interface Expense { date: string; } +export interface Income { + id: number; + card_id: number; + value: number; + comment: string; + date: string; +} + export interface Transfer { id: number; from_card_id: number; @@ -48,6 +56,7 @@ export const EntityTypes = { type: "Type", category: "Category", expense: "Expense", + income: "Income", transfer: "Transfer", } as const; @@ -57,6 +66,7 @@ export type EntityType = T extends "type" ? Type : T extends "category" ? Category : T extends "expense" ? Expense : + T extends "income" ? Income : T extends "transfer" ? Transfer : never;