apply .gitignore clean-up
Change-Id: Idd0b57a7340f0e62c85090d84c4fdb8cb5d6fe00
diff --git a/src/main/java/com/example/myproject/entity/SeedRating.java b/src/main/java/com/example/myproject/entity/SeedRating.java
new file mode 100644
index 0000000..268f64e
--- /dev/null
+++ b/src/main/java/com/example/myproject/entity/SeedRating.java
@@ -0,0 +1,59 @@
+package com.example.myproject.entity;
+
+import javax.persistence.*;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+
+@Entity
+@Table(name = "seed_rating", uniqueConstraints = @UniqueConstraint(columnNames = {"seed_id", "user_id"}))
+public class SeedRating {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "rating_id")
+ private Long ratingId;
+
+ @Column(name = "seed_id", nullable = false)
+ private Long seedId;
+
+ @Column(name = "user_id", nullable = false)
+ private Long userId;
+
+ @Column(name = "score", nullable = false)
+ @Min(0)
+ @Max(10)
+ private Integer score;
+
+ // Getters and Setters
+ public Long getRatingId() {
+ return ratingId;
+ }
+
+ public void setRatingId(Long ratingId) {
+ this.ratingId = ratingId;
+ }
+
+ public Long getSeedId() {
+ return seedId;
+ }
+
+ public void setSeedId(Long seedId) {
+ this.seedId = seedId;
+ }
+
+ public Long getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Long userId) {
+ this.userId = userId;
+ }
+
+ public Integer getScore() {
+ return score;
+ }
+
+ public void setScore(Integer score) {
+ this.score = score;
+ }
+}
\ No newline at end of file