|
|
|
@ -21,9 +21,9 @@ public record Status(String name, int code) implements Mappable { |
|
|
|
|
|
|
|
|
|
|
|
public static Status of(int code){ |
|
|
|
public static Status of(int code){ |
|
|
|
return switch (code){ |
|
|
|
return switch (code){ |
|
|
|
case 10 -> OPEN; |
|
|
|
case 10 -> PENDING; |
|
|
|
case 20 -> STARTED; |
|
|
|
case 20 -> OPEN; |
|
|
|
case 40 -> PENDING; |
|
|
|
case 40 -> STARTED; |
|
|
|
case 60 -> COMPLETE; |
|
|
|
case 60 -> COMPLETE; |
|
|
|
case 100 -> CANCELLED; |
|
|
|
case 100 -> CANCELLED; |
|
|
|
default -> throw new IllegalArgumentException(); |
|
|
|
default -> throw new IllegalArgumentException(); |
|
|
|
|