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/HabitHistory.ts

19 lines
470 B
TypeScript
Raw Normal View History

2024-03-16 00:36:44 +01:00
import type { Habit } from "./Habit"
import type { HabitProgress } from "./HabitProgress"
2024-03-22 10:23:28 +01:00
export interface HabitHistoryJSON {
2024-03-16 00:36:44 +01:00
habit: Habit
progressHistory: HabitProgress[]
}
2024-03-22 10:23:28 +01:00
export class HabitHistory implements HabitHistoryJSON {
2024-03-16 00:36:44 +01:00
public habit: Habit
public progressHistory: HabitProgress[]
2024-03-22 10:23:28 +01:00
public constructor(options: HabitHistoryJSON) {
2024-03-16 00:36:44 +01:00
const { habit, progressHistory } = options
this.habit = habit
this.progressHistory = progressHistory
}
}