Skip to content

Commit

Permalink
Merge pull request #577 from School-of-Company/576-update/club-name-u…
Browse files Browse the repository at this point in the history
…nique

# 576 Club/Government Name Field Unique
  • Loading branch information
JuuuuHong authored Sep 10, 2024
2 parents 11a20e7 + 617c9f2 commit b4cccfc
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 b4cccfc

Please sign in to comment.