Compare commits
31 Commits
662e3433d2
...
0bec7b3b3b
| Author | SHA1 | Date | |
|---|---|---|---|
| 0bec7b3b3b | |||
|
|
fbec462f65 | ||
|
|
8b9765852b | ||
|
|
830d8a672f | ||
|
|
ae53f3e733 | ||
| d87bdfbe91 | |||
|
|
22191e63ef | ||
|
|
e261065a62 | ||
| 49ad550839 | |||
|
|
bd2cad7c34 | ||
|
|
db7fc1d16d | ||
| 23232954f1 | |||
| 4e3477af77 | |||
|
|
296bcf8d70 | ||
|
|
544cbd0ac8 | ||
|
|
0eddd7889f | ||
| 192191d352 | |||
|
|
bda791567c | ||
|
|
1e09463984 | ||
|
|
a89c54f8c0 | ||
| cbaee01d13 | |||
| 2dad64ab10 | |||
| 9b51b26b0e | |||
| 646c37ea57 | |||
| a5799843d3 | |||
|
|
7a13d9cdda | ||
|
|
0c5f4a8c9b | ||
|
|
c5d1814be4 | ||
| ca7e93908d | |||
| a735162974 | |||
| 3d3177bbfa |
@@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user