diff --git a/src/main/java/com/gdschongik/gdsc/domain/membership/domain/Membership.java b/src/main/java/com/gdschongik/gdsc/domain/membership/domain/Membership.java index 128836c8a..7a1e70789 100644 --- a/src/main/java/com/gdschongik/gdsc/domain/membership/domain/Membership.java +++ b/src/main/java/com/gdschongik/gdsc/domain/membership/domain/Membership.java @@ -16,6 +16,8 @@ import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; @@ -23,6 +25,7 @@ @Entity @Getter +@Table(uniqueConstraints = {@UniqueConstraint(columnNames = {"member_id", "recruitment_round_id"})}) @NoArgsConstructor(access = AccessLevel.PROTECTED) public class Membership extends BaseEntity {