Skip to content

Commit

Permalink
[refactor] : Gallery 도메인에 updated_order 필드를 추가한다
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb committed Feb 20, 2024
1 parent 5868456 commit efefd78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions api/src/main/resources/db/migration/V7__add_gallery.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ create table if not exists gallery (
survey_id BIGINT unique not null,
bookmarked_count INT not null,
position VARCHAR(255) not null,
update_order TIMESTAMP(6) not null,
created_at TIMESTAMP(6) not null,
updated_at TIMESTAMP(6) not null
);
10 changes: 5 additions & 5 deletions gallery/src/main/kotlin/me/nalab/gallery/domain/Gallery.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package me.nalab.gallery.domain

import me.nalab.core.data.common.TimeBaseEntity
import javax.persistence.Column
import javax.persistence.Embedded
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table
import java.time.Instant
import javax.persistence.*

@Entity
@Table(name = "gallery")
Expand All @@ -19,4 +16,7 @@ class Gallery(

@Embedded
val survey: Survey,

@Column(name = "update_order", columnDefinition = "TIMESTAMP(6)", nullable = false)
private var updateOrder: Instant,
) : TimeBaseEntity()

0 comments on commit efefd78

Please sign in to comment.