Skip to content

Commit

Permalink
refacor:#4 DutyStatus Enum 클래스 생성 및 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
nyeJiiii committed Aug 1, 2023
1 parent 1dd8a3a commit abf6fc8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ public class Duty {

private LocalDate date;
private String reason;
private String status; //TODO enum 타입으로 변경 (대기, 승인, 반려)
private DutyStatus status; //대기(0), 승인(1), 반려(2)
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static class DutyDTO {
private Long id;
private LocalDate date;
private String reason;
private String status;
private DutyStatus status;

public DutyDTO(Duty duty) {
this.id = duty.getId();
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/com/example/kdtbe5_miniproject/duty/DutyStatus.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.example.kdtbe5_miniproject.duty;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor
public enum DutyStatus {
대기(0),
승인(1),
반려(2);

private final int typeStatus;
}

0 comments on commit abf6fc8

Please sign in to comment.