diff --git a/src/main/java/com/endlesshorses/oot/OotApplication.java b/src/main/java/com/endlesshorses/oot/OotApplication.java index b00ab42..67ba522 100644 --- a/src/main/java/com/endlesshorses/oot/OotApplication.java +++ b/src/main/java/com/endlesshorses/oot/OotApplication.java @@ -8,7 +8,6 @@ public class OotApplication { public static void main(String[] args) { SpringApplication.run(OotApplication.class, args); - } } diff --git a/src/main/java/com/endlesshorses/oot/custom/result/entity/Result.java b/src/main/java/com/endlesshorses/oot/custom/result/entity/Result.java index d3c369a..f1ea661 100644 --- a/src/main/java/com/endlesshorses/oot/custom/result/entity/Result.java +++ b/src/main/java/com/endlesshorses/oot/custom/result/entity/Result.java @@ -1,5 +1,6 @@ package com.endlesshorses.oot.custom.result.entity; +import com.endlesshorses.oot.custom.accessory.enity.Accessory; import com.endlesshorses.oot.custom.color.entity.Color; import com.endlesshorses.oot.custom.font.entity.Font; import com.endlesshorses.oot.custom.pattern.entity.Pattern; @@ -7,18 +8,20 @@ import jakarta.persistence.*; import lombok.Getter; import lombok.NoArgsConstructor; +import org.springframework.cglib.core.KeyFactory; import org.springframework.data.annotation.CreatedDate; import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; +import java.util.UUID; @Entity @Getter @NoArgsConstructor public class Result { + @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; + @GeneratedValue(generator = "uuid2") + @Column(columnDefinition = "BINARY(16)") + private UUID id; @ManyToOne @JoinColumn(name = "PATTERN_ID", nullable = false) @@ -36,10 +39,12 @@ public class Result { @JoinColumn(name = "FONT_COLOR_ID", nullable = false) private Color color; + @ManyToOne + @JoinColumn(name = "ACCESSORY_ID") + private Accessory accessory; @Column(nullable = false) @CreatedDate private LocalDateTime createdAt; - }