1
1
mirror of https://github.com/theoludwig/p61-project.git synced 2024-07-17 07:00:12 +02:00
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
}
}