sum
This commit is contained in:
83
src/lib/types.ts
Normal file
83
src/lib/types.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
export type CategoryType =
|
||||
| "income"
|
||||
| "bill"
|
||||
| "variable_expense"
|
||||
| "debt"
|
||||
| "saving"
|
||||
| "investment"
|
||||
|
||||
export type ItemTier = "fixed" | "variable" | "one_off"
|
||||
|
||||
export interface Profile {
|
||||
id: string
|
||||
display_name: string | null
|
||||
locale: string
|
||||
currency: string
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface Category {
|
||||
id: string
|
||||
user_id: string
|
||||
name: string
|
||||
type: CategoryType
|
||||
icon: string | null
|
||||
sort_order: number
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface Template {
|
||||
id: string
|
||||
user_id: string
|
||||
name: string
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface TemplateItem {
|
||||
id: string
|
||||
template_id: string
|
||||
category_id: string
|
||||
item_tier: Exclude<ItemTier, "one_off">
|
||||
budgeted_amount: number
|
||||
sort_order: number
|
||||
created_at: string
|
||||
updated_at: string
|
||||
category?: Category
|
||||
}
|
||||
|
||||
export interface Budget {
|
||||
id: string
|
||||
user_id: string
|
||||
start_date: string
|
||||
end_date: string
|
||||
currency: string
|
||||
carryover_amount: number
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface BudgetItem {
|
||||
id: string
|
||||
budget_id: string
|
||||
category_id: string
|
||||
budgeted_amount: number
|
||||
actual_amount: number
|
||||
item_tier: ItemTier
|
||||
notes: string | null
|
||||
created_at: string
|
||||
updated_at: string
|
||||
category?: Category
|
||||
}
|
||||
|
||||
export interface QuickAddItem {
|
||||
id: string
|
||||
user_id: string
|
||||
name: string
|
||||
icon: string | null
|
||||
sort_order: number
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
Reference in New Issue
Block a user