This repository has been archived on 2024-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
p61-project/domain/entities/HabitsTracker.ts

19 lines
456 B
TypeScript
Raw Normal View History

2024-03-16 00:36:44 +01:00
import type { HabitHistory } from "./HabitHistory"
2024-03-22 10:23:28 +01:00
export interface HabitsTrackerData {
2024-03-16 00:36:44 +01:00
habitsHistory: HabitHistory[]
}
2024-03-22 10:23:28 +01:00
export class HabitsTracker implements HabitsTrackerData {
2024-03-16 00:36:44 +01:00
public habitsHistory: HabitHistory[]
2024-03-22 10:23:28 +01:00
public constructor(options: HabitsTrackerData) {
2024-03-16 00:36:44 +01:00
const { habitsHistory } = options
this.habitsHistory = habitsHistory
}
public static default(): HabitsTracker {
return new HabitsTracker({ habitsHistory: [] })
}
}