Skip to content

Commit

Permalink
add :: name unique
Browse files Browse the repository at this point in the history
  • Loading branch information
JuuuuHong committed Sep 10, 2024
1 parent 11a20e7 commit 617c9f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Club(
@JoinColumn(name = "school_id", nullable = false)
val school: School,

@Column(name = "name", columnDefinition = "VARCHAR(30)", nullable = false)
@Column(name = "name", columnDefinition = "VARCHAR(30)", nullable = false, unique = true)
val name: String,

@Enumerated(EnumType.STRING)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class Government(

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false, unique = false)
@Column(name = "id", nullable = false)
val id: Long = 0,

@Column(name = "name", nullable = false)
@Column(name = "name", nullable = false, unique = true)
val name: String,

@Enumerated(EnumType.STRING)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ class Post (
@Enumerated(EnumType.STRING)
@Column(columnDefinition = "VARCHAR(10)", nullable = false)
val feedType: FeedType

) : BaseUUIDEntity(id)

0 comments on commit 617c9f2

Please sign in to comment.