Skip to content

Commit aa5c02c

Browse files
authored
[DEMBE-50] picture의 key컬럼을 uuid로 변경한다 (#51)
* feat: picture의 key컬럼을 uuid로 변경 * feat: PromiseProgeress type컬럼 예약어라 promise_progress_group로 수정 * fix: PromiseDomainService conflict 해결 * style: spotless
1 parent 2ab3ba7 commit aa5c02c

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

Whatnow-Domain/src/main/kotlin/com/depromeet/whatnow/domains/picture/domain/Picture.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Picture(
1717

1818
var uri: String,
1919

20-
var key: String,
20+
var uuid: String,
2121

2222
@Id
2323
@GeneratedValue(strategy = GenerationType.IDENTITY)

Whatnow-Domain/src/main/kotlin/com/depromeet/whatnow/domains/promise/domain/PromiseRegisterEvent.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import com.depromeet.whatnow.common.aop.event.DomainEvent
44

55
class PromiseRegisterEvent(
66
val promiseId: Long,
7-
) : DomainEvent(){
7+
) : DomainEvent() {
88
// Factory method
99
companion object {
1010
fun from(promise: Promise): PromiseRegisterEvent {

Whatnow-Domain/src/main/kotlin/com/depromeet/whatnow/domains/promise/service/PromiseDomainService.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import com.depromeet.whatnow.common.vo.PlaceVo
44
import com.depromeet.whatnow.domains.promise.adaptor.PromiseAdaptor
55
import com.depromeet.whatnow.domains.promise.domain.Promise
66
import com.depromeet.whatnow.domains.promise.domain.PromiseType
7-
import com.depromeet.whatnow.domains.promiseprogress.domain.PromiseProgressType
7+
import com.depromeet.whatnow.domains.promiseprogress.domain.PromiseProgressGroup
88
import org.springframework.stereotype.Service
99
import java.time.LocalDateTime
1010
import javax.transaction.Transactional
@@ -56,14 +56,14 @@ class PromiseDomainService(
5656

5757
// 약속 진행상태(출발 전, 이동 중, 도착, ETC) 변경
5858
@Transactional
59-
fun pendingPromiseProgressType(promiseId: Long, promiseProgressType: PromiseProgressType): Promise {
59+
fun pendingPromiseProgressType(promiseId: Long, promiseProgressGroup: PromiseProgressGroup): Promise {
6060
val promise = promiseAdaptor.queryPromise(promiseId)
6161
promise.pendingPromise()
6262
return promise
6363
}
6464

6565
@Transactional
66-
fun endPromiseProgressType(promiseId: Long, promiseProgressType: PromiseProgressType): Promise {
66+
fun endPromiseProgressType(promiseId: Long, promiseProgressGroup: PromiseProgressGroup): Promise {
6767
val promise = promiseAdaptor.queryPromise(promiseId)
6868
promise.endPromise()
6969
return promise

Whatnow-Domain/src/main/kotlin/com/depromeet/whatnow/domains/promiseprogress/domain/PromiseProgress.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import javax.persistence.Table
1515
class PromiseProgress(
1616

1717
@Enumerated(EnumType.STRING)
18-
@Column(name = "type")
18+
@Column(name = "promise_progress_group")
1919
var group: PromiseProgressGroup,
2020

2121
var code: String, // 상태 코드

Whatnow-Domain/src/main/resources/data.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
INSERT INTO tbl_promise_progress(promise_progress_id, type, code , kr, img )
1+
INSERT INTO tbl_promise_progress(promise_progress_id, promise_progress_group, code , kr, img )
22
VALUES
33
(1,'PREPARING','SHOWER' ,'씻는중',''),
44
(2,'PREPARING','LEAVE_SOON' ,'곧 나감',''),
@@ -13,4 +13,4 @@ VALUES
1313
(11,'EXPECTED_TIME','AFTER_5' ,'5분뒤 도착',''),
1414
(12,'EXPECTED_TIME','AFTER_10' ,'10분뒤 도착',''),
1515
(13,'DEFAULT','DEFAULT' ,'기본 속성','')
16-
ON DUPLICATE KEY UPDATE type = VALUES (type), code = VALUES (code), kr = VALUES (kr), img = VALUES (img);
16+
ON DUPLICATE KEY UPDATE promise_progress_group = VALUES (promise_progress_group), code = VALUES (code), kr = VALUES (kr), img = VALUES (img);

0 commit comments

Comments
 (0)