mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-20 22:24:28 +01:00
Initial commit
This commit is contained in:
35
lib/types.ts
Normal file
35
lib/types.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
export type Habit = {
|
||||
id: string
|
||||
name: string
|
||||
description: string
|
||||
frequency: 'daily' | 'weekly' | 'monthly'
|
||||
coinReward: number
|
||||
completions: string[] // Array of ISO date strings
|
||||
}
|
||||
|
||||
export type WishlistItemType = {
|
||||
id: string
|
||||
name: string
|
||||
description: string
|
||||
coinCost: number
|
||||
}
|
||||
|
||||
export type TransactionType = 'HABIT_COMPLETION' | 'HABIT_UNDO' | 'WISH_REDEMPTION' | 'MANUAL_ADJUSTMENT';
|
||||
|
||||
export interface CoinTransaction {
|
||||
id: string;
|
||||
amount: number;
|
||||
type: TransactionType;
|
||||
description: string;
|
||||
timestamp: string;
|
||||
relatedItemId?: string;
|
||||
}
|
||||
|
||||
export interface HabitsData {
|
||||
habits: Habit[];
|
||||
}
|
||||
|
||||
export interface CoinsData {
|
||||
balance: number;
|
||||
transactions: CoinTransaction[];
|
||||
}
|
||||
Reference in New Issue
Block a user