Skip to content

[DEMBE-50] picture의 key컬럼을 uuid로 변경한다 #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Picture(

var uri: String,

var key: String,
var uuid: String,

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import com.depromeet.whatnow.common.aop.event.DomainEvent

class PromiseRegisterEvent(
val promiseId: Long,
) : DomainEvent(){
) : DomainEvent() {
// Factory method
companion object {
fun from(promise: Promise): PromiseRegisterEvent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import com.depromeet.whatnow.common.vo.PlaceVo
import com.depromeet.whatnow.domains.promise.adaptor.PromiseAdaptor
import com.depromeet.whatnow.domains.promise.domain.Promise
import com.depromeet.whatnow.domains.promise.domain.PromiseType
import com.depromeet.whatnow.domains.promiseprogress.domain.PromiseProgressType
import com.depromeet.whatnow.domains.promiseprogress.domain.PromiseProgressGroup
import org.springframework.stereotype.Service
import java.time.LocalDateTime
import javax.transaction.Transactional
Expand Down Expand Up @@ -56,14 +56,14 @@ class PromiseDomainService(

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

@Transactional
fun endPromiseProgressType(promiseId: Long, promiseProgressType: PromiseProgressType): Promise {
fun endPromiseProgressType(promiseId: Long, promiseProgressGroup: PromiseProgressGroup): Promise {
val promise = promiseAdaptor.queryPromise(promiseId)
promise.endPromise()
return promise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import javax.persistence.Table
class PromiseProgress(

@Enumerated(EnumType.STRING)
@Column(name = "type")
@Column(name = "promise_progress_group")
var group: PromiseProgressGroup,

var code: String, // 상태 코드
Expand Down
4 changes: 2 additions & 2 deletions Whatnow-Domain/src/main/resources/data.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
INSERT INTO tbl_promise_progress(promise_progress_id, type, code , kr, img )
INSERT INTO tbl_promise_progress(promise_progress_id, promise_progress_group, code , kr, img )
VALUES
(1,'PREPARING','SHOWER' ,'씻는중',''),
(2,'PREPARING','LEAVE_SOON' ,'곧 나감',''),
Expand All @@ -13,4 +13,4 @@ VALUES
(11,'EXPECTED_TIME','AFTER_5' ,'5분뒤 도착',''),
(12,'EXPECTED_TIME','AFTER_10' ,'10분뒤 도착',''),
(13,'DEFAULT','DEFAULT' ,'기본 속성','')
ON DUPLICATE KEY UPDATE type = VALUES (type), code = VALUES (code), kr = VALUES (kr), img = VALUES (img);
ON DUPLICATE KEY UPDATE promise_progress_group = VALUES (promise_progress_group), code = VALUES (code), kr = VALUES (kr), img = VALUES (img);