generated from pricelees/issue-pr-template
refactor: StoreEntity에 'by' audit 정보 추가
This commit is contained in:
parent
2d138ff325
commit
cdf7a98867
@ -4,11 +4,8 @@ import jakarta.persistence.Column
|
|||||||
import jakarta.persistence.Entity
|
import jakarta.persistence.Entity
|
||||||
import jakarta.persistence.EntityListeners
|
import jakarta.persistence.EntityListeners
|
||||||
import jakarta.persistence.Table
|
import jakarta.persistence.Table
|
||||||
import org.springframework.data.annotation.CreatedDate
|
|
||||||
import org.springframework.data.annotation.LastModifiedDate
|
|
||||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener
|
import org.springframework.data.jpa.domain.support.AuditingEntityListener
|
||||||
import roomescape.common.entity.PersistableBaseEntity
|
import roomescape.common.entity.AuditingBaseEntity
|
||||||
import java.time.LocalDateTime
|
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@EntityListeners(AuditingEntityListener::class)
|
@EntityListeners(AuditingEntityListener::class)
|
||||||
@ -29,12 +26,4 @@ class StoreEntity(
|
|||||||
val businessRegNum: String,
|
val businessRegNum: String,
|
||||||
|
|
||||||
val regionCode: String,
|
val regionCode: String,
|
||||||
) : PersistableBaseEntity(id) {
|
) : AuditingBaseEntity(id)
|
||||||
|
|
||||||
@CreatedDate
|
|
||||||
@Column(updatable = false)
|
|
||||||
lateinit var createdAt: LocalDateTime
|
|
||||||
|
|
||||||
@LastModifiedDate
|
|
||||||
lateinit var updatedAt: LocalDateTime
|
|
||||||
}
|
|
||||||
|
|||||||
@ -17,7 +17,9 @@ create table if not exists store(
|
|||||||
region_code varchar(10) not null,
|
region_code varchar(10) not null,
|
||||||
|
|
||||||
created_at timestamp not null,
|
created_at timestamp not null,
|
||||||
|
created_by bigint not null,
|
||||||
updated_at timestamp not null,
|
updated_at timestamp not null,
|
||||||
|
updated_by bigint not null,
|
||||||
|
|
||||||
constraint uk_store__name unique (name),
|
constraint uk_store__name unique (name),
|
||||||
constraint uk_store__contact unique (contact),
|
constraint uk_store__contact unique (contact),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user