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;
}
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 EntityName> =
T extends "type" ? Type :
T extends "category" ? Category :
T extends "expense" ? Expense :
T extends "income" ? Income :
T extends "transfer" ? Transfer :
never;