Skip to content

Commit

Permalink
refactor : survey 도메인을 me.nalab.api.survey.domain 하위로 이동한다
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb committed Mar 8, 2024
1 parent 3536b32 commit 06a964f
Show file tree
Hide file tree
Showing 22 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package domain.feedback
package me.nalab.api.survey.domain.feedback

import me.nalab.core.time.TimeUtil
import java.time.Instant
Expand All @@ -8,7 +8,7 @@ import javax.persistence.Embeddable
@Embeddable
class Bookmark(
@Column(name = "is_bookmarked", nullable = false)
var isBookmarked: Boolean = domain.feedback.Bookmark.Companion.BOOKMARK_DEFAULT_STATE,
var isBookmarked: Boolean = BOOKMARK_DEFAULT_STATE,

@Column(name = "bookmarked_at", columnDefinition = "TIMESTAMP(6)", nullable = false)
var bookmarkedAt: Instant,
Expand All @@ -17,7 +17,7 @@ class Bookmark(
companion object {
private const val BOOKMARK_DEFAULT_STATE = false

fun impossible(): domain.feedback.Bookmark =
domain.feedback.Bookmark(bookmarkedAt = TimeUtil.toInstant())
fun impossible(): Bookmark =
Bookmark(bookmarkedAt = TimeUtil.toInstant())
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package domain.feedback

import me.nalab.api.survey.domain.feedback.Bookmark
import javax.persistence.*

@Entity
class ChoiceFormQuestionFeedback(
id: Long,
formQuestionId: Long,
isRead: Boolean = false,
bookmark: domain.feedback.Bookmark = domain.feedback.Bookmark.Companion.impossible(),
bookmark: Bookmark = Bookmark.Companion.impossible(),
feedback: domain.feedback.Feedback,

@ElementCollection
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package domain.feedback

import me.nalab.api.survey.domain.feedback.Bookmark
import javax.persistence.*

@Entity
Expand All @@ -17,7 +18,7 @@ abstract class FormQuestionFeedbackable(
open var isRead: Boolean = false,

@Embedded
open val bookmark: domain.feedback.Bookmark,
open val bookmark: Bookmark,

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "feedback_id")
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package domain.feedback

import me.nalab.api.survey.domain.feedback.Bookmark
import javax.persistence.*

@Entity
class ShortFormQuestionFeedback(
id: Long,
formQuestionId: Long,
isRead: Boolean = false,
bookmark: domain.feedback.Bookmark,
bookmark: Bookmark,
feedback: domain.feedback.Feedback,

@ElementCollection
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 06a964f

Please sign in to comment.