diff --git a/src/main/java/com/example/demo/app/domain/model/GoalModel.java b/src/main/java/com/example/demo/app/domain/model/GoalModel.java deleted file mode 100644 index 94a57d2..0000000 --- a/src/main/java/com/example/demo/app/domain/model/GoalModel.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.example.demo.app.domain.model; - -import java.time.LocalDate; - -import com.example.demo.app.infra.entity.GoalEntity; -import com.example.demo.app.presentation.form.GoalForm; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public class GoalModel { - - private Long goalId; - - private String goalTitle; - - private String goalSubtitle; - - private Integer targetAmount; - - private LocalDate deadline; - - private Integer goalComplete; - - public static GoalModel convertFrom(GoalEntity goalEntity) { - return new GoalModel( - goalEntity.getGoalId(), - goalEntity.getGoalTitle(), - goalEntity.getGoalSubtitle(), - goalEntity.getTargetAmount(), - goalEntity.getDeadline(), - goalEntity.getGoalComplete()); - } - - public static GoalEntity convertTo(GoalModel goalModel) { - return new GoalEntity( - goalModel.getGoalId(), - goalModel.getGoalTitle(), - goalModel.getGoalSubtitle(), - goalModel.getTargetAmount(), - goalModel.getDeadline(), - goalModel.getGoalComplete(), - null); - } - - public static GoalModel convertFrom(GoalForm goalForm) { - return new GoalModel( - goalForm.getGoalId(), - goalForm.getGoalTitle(), - goalForm.getGoalSubtitle(), - goalForm.getTargetAmount(), - goalForm.getDeadline(), - goalForm.getGoalComplete()); - } - -} \ No newline at end of file