-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: 번쩍 도메인 네이밍 lightning -> flash로 변경 (#544)
* chore: 환경 설정 관련 도메인 네이밍 변경 * chore: 서비스 로직 관련 도메인 네이밍 변경 * chore: 모임 관련 번쩍 네이밍 변경 * chore: 태그 관련 번쩍 네이밍 변경 * chore: 에러메시지 관련 번쩍 네이밍 변경 * chore: enum value에 공백 추가 * refactor: 반환 변수 네이밍 변경
- Loading branch information
1 parent
39f8fb1
commit 96ebe1f
Showing
43 changed files
with
426 additions
and
426 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
9 changes: 9 additions & 0 deletions
9
main/src/main/java/org/sopt/makers/crew/main/entity/flash/FlashRepository.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,9 @@ | ||
package org.sopt.makers.crew.main.entity.flash; | ||
|
||
import java.util.Optional; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface FlashRepository extends JpaRepository<Flash, Integer> { | ||
Optional<Flash> findByMeetingId(Integer meetingId); | ||
} |
20 changes: 20 additions & 0 deletions
20
...c/main/java/org/sopt/makers/crew/main/entity/flash/converter/FlashPlaceTypeConverter.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,20 @@ | ||
package org.sopt.makers.crew.main.entity.flash.converter; | ||
|
||
import org.sopt.makers.crew.main.entity.flash.enums.FlashPlaceType; | ||
|
||
import jakarta.persistence.AttributeConverter; | ||
import jakarta.persistence.Converter; | ||
|
||
@Converter | ||
public class FlashPlaceTypeConverter implements AttributeConverter<FlashPlaceType, String> { | ||
|
||
@Override | ||
public String convertToDatabaseColumn(FlashPlaceType flashPlaceType) { | ||
return flashPlaceType.getValue(); // FlashPlaceType의 값을 반환 | ||
} | ||
|
||
@Override | ||
public FlashPlaceType convertToEntityAttribute(String dbData) { | ||
return FlashPlaceType.ofValue(dbData); // dbData에 해당하는 FlashPlaceType 객체를 반환 | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
.../main/java/org/sopt/makers/crew/main/entity/flash/converter/FlashTimingTypeConverter.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,20 @@ | ||
package org.sopt.makers.crew.main.entity.flash.converter; | ||
|
||
import org.sopt.makers.crew.main.entity.flash.enums.FlashTimingType; | ||
|
||
import jakarta.persistence.AttributeConverter; | ||
import jakarta.persistence.Converter; | ||
|
||
@Converter | ||
public class FlashTimingTypeConverter implements AttributeConverter<FlashTimingType, String> { | ||
|
||
@Override | ||
public String convertToDatabaseColumn(FlashTimingType flashTimingType) { | ||
return flashTimingType.getValue(); // FlashTimingType의 값을 반환 | ||
} | ||
|
||
@Override | ||
public FlashTimingType convertToEntityAttribute(String dbData) { | ||
return FlashTimingType.ofValue(dbData); // dbData에 해당하는 FlashTimingType 객체를 반환 | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
main/src/main/java/org/sopt/makers/crew/main/entity/flash/enums/FlashPlaceType.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,25 @@ | ||
package org.sopt.makers.crew.main.entity.flash.enums; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum FlashPlaceType { | ||
OFFLINE("오프라인"), | ||
ONLINE("온라인"), | ||
AFTER_DISCUSSION("협의 후 결정"); | ||
|
||
private final String value; | ||
|
||
FlashPlaceType(String value) { | ||
this.value = value; | ||
} | ||
|
||
public static FlashPlaceType ofValue(String dbData) { | ||
for (FlashPlaceType place : FlashPlaceType.values()) { | ||
if (place.getValue().equals(dbData)) { | ||
return place; | ||
} | ||
} | ||
throw new IllegalArgumentException("Invalid FlashPlaceType value: " + dbData); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
main/src/main/java/org/sopt/makers/crew/main/entity/flash/enums/FlashTimingType.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,24 @@ | ||
package org.sopt.makers.crew.main.entity.flash.enums; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum FlashTimingType { | ||
IMMEDIATE("당일"), | ||
AFTER_DISCUSSION("예정 기간 (협의 후 결정)"); | ||
|
||
private final String value; | ||
|
||
FlashTimingType(String value) { | ||
this.value = value; | ||
} | ||
|
||
public static FlashTimingType ofValue(String dbData) { | ||
for (FlashTimingType timing : FlashTimingType.values()) { | ||
if (timing.getValue().equals(dbData)) { | ||
return timing; | ||
} | ||
} | ||
throw new IllegalArgumentException("Invalid FlashTimingType value: " + dbData); | ||
} | ||
} |
9 changes: 0 additions & 9 deletions
9
main/src/main/java/org/sopt/makers/crew/main/entity/lightning/LightningRepository.java
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
...ava/org/sopt/makers/crew/main/entity/lightning/converter/LightningPlaceTypeConverter.java
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
...va/org/sopt/makers/crew/main/entity/lightning/converter/LightningTimingTypeConverter.java
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
main/src/main/java/org/sopt/makers/crew/main/entity/lightning/enums/LightningPlaceType.java
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
main/src/main/java/org/sopt/makers/crew/main/entity/lightning/enums/LightningTimingType.java
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.