1
1
mirror of https://github.com/theoludwig/p61-project.git synced 2024-07-17 07:00:12 +02:00
p61-project/domain/use-cases/HabitGoalProgressUpdate.ts
2024-04-11 12:32:09 +02:00

29 lines
860 B
TypeScript

import type { GoalProgress } from "../entities/Goal"
import type { HabitHistory } from "../entities/HabitHistory"
import type { HabitProgressCreateRepository } from "../repositories/HabitProgressCreate"
import type { HabitProgressUpdateRepository } from "../repositories/HabitProgressUpdate"
export interface HabitGoalProgressUpdateOptions {
date: Date
goalProgress: GoalProgress
habitHistory: HabitHistory
}
export class HabitGoalProgressUpdateUseCase
implements HabitGoalProgressUpdateOptions
{
public date: Date
public goalProgress: GoalProgress
public habitHistory: HabitHistory
public constructor(option: HabitGoalProgressUpdateOptions) {
this.date = option.date
this.goalProgress = option.goalProgress
this.habitHistory = option.habitHistory
}
public async execute(data: unknown): Promise<HabitHistory> {
//
}
}