#21 -- Init default dated

This commit is contained in:
Anton Romanov 2025-04-03 00:02:20 +04:00
parent e7ef4099fa
commit fcdd90924c
2 changed files with 3 additions and 3 deletions

View File

@ -12,11 +12,11 @@ import java.util.Date;
public class ReportPeriod extends BaseEntity {
@Temporal(TemporalType.DATE)
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date startDate;
private Date startDate = new Date();
@Temporal(TemporalType.DATE)
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date endDate;
private Date endDate = new Date();
public Date getStartDate() {
return startDate;

View File

@ -31,7 +31,7 @@ public class ReportPeriodService {
}
public void delete(ReportPeriod reportPeriod) {
reportPeriodRepository.delete(reportPeriod);
reportPeriodRepository.deleteById(reportPeriod.getId());
}
public ReportPeriod getById(Integer reportPeriodId) {