Add Income interface

This commit is contained in:
qowevisa 2024-11-19 10:09:52 +02:00
parent b81c097da2
commit 37cf8f2614

View File

@ -35,6 +35,14 @@ export interface Expense {
date: string; date: string;
} }
export interface Income {
id: number;
card_id: number;
value: number;
comment: string;
date: string;
}
export interface Transfer { export interface Transfer {
id: number; id: number;
from_card_id: number; from_card_id: number;
@ -48,6 +56,7 @@ export const EntityTypes = {
type: "Type", type: "Type",
category: "Category", category: "Category",
expense: "Expense", expense: "Expense",
income: "Income",
transfer: "Transfer", transfer: "Transfer",
} as const; } as const;
@ -57,6 +66,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 "income" ? Income :
T extends "transfer" ? Transfer : T extends "transfer" ? Transfer :
never; never;