diff --git a/bitgouel-domain/src/main/kotlin/team/msg/domain/club/model/Club.kt b/bitgouel-domain/src/main/kotlin/team/msg/domain/club/model/Club.kt index 1f83281e7..3e67f6e0a 100644 --- a/bitgouel-domain/src/main/kotlin/team/msg/domain/club/model/Club.kt +++ b/bitgouel-domain/src/main/kotlin/team/msg/domain/club/model/Club.kt @@ -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) diff --git a/bitgouel-domain/src/main/kotlin/team/msg/domain/government/model/Government.kt b/bitgouel-domain/src/main/kotlin/team/msg/domain/government/model/Government.kt index ba647b331..8f719e4ba 100644 --- a/bitgouel-domain/src/main/kotlin/team/msg/domain/government/model/Government.kt +++ b/bitgouel-domain/src/main/kotlin/team/msg/domain/government/model/Government.kt @@ -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) diff --git a/bitgouel-domain/src/main/kotlin/team/msg/domain/post/model/Post.kt b/bitgouel-domain/src/main/kotlin/team/msg/domain/post/model/Post.kt index 2579f9910..9516e32c7 100644 --- a/bitgouel-domain/src/main/kotlin/team/msg/domain/post/model/Post.kt +++ b/bitgouel-domain/src/main/kotlin/team/msg/domain/post/model/Post.kt @@ -35,4 +35,5 @@ class Post ( @Enumerated(EnumType.STRING) @Column(columnDefinition = "VARCHAR(10)", nullable = false) val feedType: FeedType + ) : BaseUUIDEntity(id) \ No newline at end of file