Skip to content

Commit

Permalink
✨ add unique key on recipe_id and sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
geoje committed Sep 25, 2024
1 parent 273c104 commit 3bfd9dc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import jakarta.persistence.UniqueConstraint;
import java.time.LocalTime;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Entity
@Getter
@Table(uniqueConstraints = {@UniqueConstraint(columnNames = {"recipe_id", "sequence"})})
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@Getter
public class RecipeStep {

@Id
Expand Down

0 comments on commit 3bfd9dc

Please sign in to comment.