|
|
@@ -0,0 +1,34 @@
|
|
|
+package pl.dmss.vmaneliuk.database.model;
|
|
|
+
|
|
|
+import jakarta.persistence.*;
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+
|
|
|
+@Entity
|
|
|
+@Table(name = "games")
|
|
|
+public class Game {
|
|
|
+
|
|
|
+ @Id
|
|
|
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
+ private Long gameId;
|
|
|
+
|
|
|
+ @ManyToOne(fetch = FetchType.LAZY)
|
|
|
+ @JoinColumn(name = "developer_id", nullable = false)
|
|
|
+ private Developer developer;
|
|
|
+
|
|
|
+ @Column(nullable = false)
|
|
|
+ private String title;
|
|
|
+
|
|
|
+ @Column(columnDefinition = "TEXT")
|
|
|
+ private String description;
|
|
|
+
|
|
|
+ @Column(nullable = false)
|
|
|
+ private BigDecimal price;
|
|
|
+
|
|
|
+ private BigDecimal discountPercent;
|
|
|
+ private String version;
|
|
|
+ private Double ratingScore;
|
|
|
+ private Integer reviewsTotal;
|
|
|
+ private String tagsList;
|
|
|
+ private LocalDateTime releaseDate;
|
|
|
+}
|