mirror of
https://github.com/theoludwig/p61-project.git
synced 2024-07-17 07:00:12 +02:00
19 lines
479 B
TypeScript
19 lines
479 B
TypeScript
|
import type { Habit } from "./Habit"
|
||
|
import type { HabitProgress } from "./HabitProgress"
|
||
|
|
||
|
export interface HabitHistoryOptions {
|
||
|
habit: Habit
|
||
|
progressHistory: HabitProgress[]
|
||
|
}
|
||
|
|
||
|
export class HabitHistory implements HabitHistoryOptions {
|
||
|
public habit: Habit
|
||
|
public progressHistory: HabitProgress[]
|
||
|
|
||
|
public constructor(options: HabitHistoryOptions) {
|
||
|
const { habit, progressHistory } = options
|
||
|
this.habit = habit
|
||
|
this.progressHistory = progressHistory
|
||
|
}
|
||
|
}
|