Add ExpenseBulk interface to entities
This commit is contained in:
parent
4e7ca13982
commit
3b8415167e
|
@ -41,6 +41,20 @@ export interface Expense {
|
||||||
show_value: string;
|
show_value: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ExpenseBulk {
|
||||||
|
propagate_card_id: boolean;
|
||||||
|
card_id: number;
|
||||||
|
propagate_type_id: boolean;
|
||||||
|
type_id: number;
|
||||||
|
propagate_value: boolean;
|
||||||
|
value: number;
|
||||||
|
propagate_comment: boolean;
|
||||||
|
comment: string;
|
||||||
|
propagate_date: boolean;
|
||||||
|
date: string;
|
||||||
|
children: Partial<Expense>[];
|
||||||
|
}
|
||||||
|
|
||||||
export interface Income {
|
export interface Income {
|
||||||
id: number;
|
id: number;
|
||||||
card_id: number;
|
card_id: number;
|
||||||
|
@ -132,6 +146,7 @@ export const EntityTypes = {
|
||||||
payment: "Payment",
|
payment: "Payment",
|
||||||
metric: "Metric",
|
metric: "Metric",
|
||||||
currency: "Currency",
|
currency: "Currency",
|
||||||
|
expense_bulk: "ExpenseBulk",
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export type EntityName = keyof typeof EntityTypes;
|
export type EntityName = keyof typeof EntityTypes;
|
||||||
|
@ -145,6 +160,7 @@ export type EntityType<T extends EntityName> =
|
||||||
T extends "payment" ? Payment :
|
T extends "payment" ? Payment :
|
||||||
T extends "metric" ? Metric :
|
T extends "metric" ? Metric :
|
||||||
T extends "currency" ? Currency :
|
T extends "currency" ? Currency :
|
||||||
|
T extends "expense_bulk" ? ExpenseBulk :
|
||||||
never;
|
never;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue
Block a user