-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
78 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/com/mpnp/baechelin/api/model/BarrierCode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.mpnp.baechelin.api.model; | ||
|
||
import lombok.Getter; | ||
|
||
import java.util.Arrays; | ||
|
||
@Getter | ||
public enum BarrierCode { | ||
ELEVATOR("계단 또는 승강설비", "elevator"), | ||
TOILET_A("소변기", "toilet"), | ||
TOILET_B("대변기", "toilet"), | ||
PARKING("장애인전용주차구역", "parking"), | ||
HEIGHT_DIFFERENCE("주출입구 높이차이 제거", "height_different"), | ||
APPROACH("주출입구 접근로", "approach"), | ||
ETC("", null); | ||
private final String desc; | ||
private final String columnName; | ||
|
||
BarrierCode(String desc, String columnName) { | ||
this.desc = desc; | ||
this.columnName = columnName; | ||
} | ||
|
||
public static String getColumnFromDesc(String desc) { | ||
BarrierCode barrierCode = Arrays.stream(BarrierCode.values()) | ||
.filter(b -> b.getDesc().equals(desc)).findFirst().orElse(ETC); | ||
return barrierCode.getColumnName(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters