Skip to content

Commit

Permalink
feat: result entity 생성 #60
Browse files Browse the repository at this point in the history
  • Loading branch information
SubiHwang committed Feb 20, 2024
1 parent 4c7b916 commit 9aedad1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/main/java/com/endlesshorses/oot/OotApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ public class OotApplication {

public static void main(String[] args) {
SpringApplication.run(OotApplication.class, args);

}

}
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
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;
import com.endlesshorses.oot.custom.wheel.entity.Wheel;
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)
Expand All @@ -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;


}

0 comments on commit 9aedad1

Please sign in to comment.