Skip to content

Commit

Permalink
add :: bookmark
Browse files Browse the repository at this point in the history
  • Loading branch information
meltapplee committed Sep 29, 2024
1 parent 118c372 commit 774f1c3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/main/kotlin/org/meogo/domain/good/Bookmark.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.meogo.domain.good

import java.util.UUID
import javax.persistence.Entity
import javax.persistence.FetchType
import javax.persistence.JoinColumn
import javax.persistence.ManyToOne
import org.meogo.domain.post.domain.Post
import org.meogo.domain.user.domain.User
import org.meogo.global.base.BaseUUIDEntity

@Entity
class Bookmark (
id: UUID? = null,


@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "post_id", nullable = true)
val post: Post? = null,


@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_id", nullable = false)
val user: User

) : BaseUUIDEntity(id)

0 comments on commit 774f1c3

Please sign in to comment.