Compare commits

...

3 Commits

Author SHA1 Message Date
TakahashiNg 36e4d29063 chore: update 2026-05-15 11:00:48 +00:00
TakahashiNg 77b6acf18a chore: update 2026-05-15 10:59:36 +00:00
TakahashiNg 1f9337074e chore: update 2026-05-15 10:58:14 +00:00
4 changed files with 8 additions and 9 deletions
@@ -1,7 +1,7 @@
package com.drinkool.dtos;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.Date;
import lombok.NoArgsConstructor;
import org.eclipse.microprofile.graphql.NonNull;
@@ -9,7 +9,7 @@ import org.eclipse.microprofile.graphql.NonNull;
public class CreateShift {
@NonNull
public Date date;
public LocalDate date;
@NonNull
public LocalTime startTime;
@@ -8,9 +8,9 @@ import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Entity
@@ -22,7 +22,7 @@ public class ShiftEntity extends BaseEntity {
public EateryEntity eatery;
@Column(nullable = false)
public Date date;
public LocalDate date;
@Column(nullable = false)
public LocalTime startTime;
@@ -6,7 +6,6 @@ import jakarta.persistence.FetchType;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import java.sql.Timestamp;
import java.util.List;
import java.util.UUID;
@@ -30,11 +29,11 @@ public class ShiftRegistrationEntity extends BaseEntity {
ShiftEntity registratingShift
) {
return list(
"staffId = ?1 and shift.startTime < ?2 and shift.endTime > ?3 and shift.date = ?3",
"staffId = ?1 and shift.startTime < ?2 and shift.endTime > ?3 and shift.date = ?4",
staffId,
registratingShift.endTime,
registratingShift.startTime,
new Timestamp(registratingShift.date.getTime())
registratingShift.date
);
}
}
@@ -10,8 +10,8 @@ import com.drinkool.entities.ShiftEntity;
import com.drinkool.entities.ShiftRegistrationEntity;
import io.quarkus.test.junit.QuarkusTest;
import jakarta.transaction.Transactional;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@@ -208,7 +208,7 @@ public class ShiftServiceTest {
) {
ShiftEntity shift = new ShiftEntity();
shift.eatery = eatery;
shift.date = new Date();
shift.date = LocalDate.now();
shift.startTime = LocalTime.parse(start);
shift.endTime = LocalTime.parse(end);
shift.wage = 10000;