diff --git a/src/main/java/kahlua/KahluaProject/domain/ticket/Ticket.java b/src/main/java/kahlua/KahluaProject/domain/ticket/Ticket.java index 6bd8ea5..c340fa9 100644 --- a/src/main/java/kahlua/KahluaProject/domain/ticket/Ticket.java +++ b/src/main/java/kahlua/KahluaProject/domain/ticket/Ticket.java @@ -5,6 +5,9 @@ import kahlua.KahluaProject.domain.BaseEntity; import lombok.*; +import static kahlua.KahluaProject.domain.ticket.Type.FRESHMAN; +import static kahlua.KahluaProject.domain.ticket.Type.GENERAL; + @Entity @Builder @Getter @@ -41,8 +44,11 @@ public class Ticket extends BaseEntity { @PrePersist public void onCreate() { - if (status == null) { + if (status == null && type == GENERAL) { status = Status.WAIT; // default 값 설정 } + else if (status == null && type == FRESHMAN) { + status = Status.FINISH; // 신입생의 경우 바로 FINISH + } } }