|
@@ -0,0 +1,89 @@
|
|
|
+package eu.jovian_hersemeule.dev.squad.squad_composer.data.jpa;
|
|
|
+
|
|
|
+import jakarta.persistence.*;
|
|
|
+import java.sql.Timestamp;
|
|
|
+
|
|
|
+@Entity
|
|
|
+@Table(name = "squad")
|
|
|
+public class SquadEntity {
|
|
|
+
|
|
|
+ @Id
|
|
|
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
+ @Column(name = "id")
|
|
|
+ private Long id;
|
|
|
+
|
|
|
+ @ManyToOne
|
|
|
+ @JoinColumn(name = "player_id", insertable = false, updatable = false)
|
|
|
+ private PlayerEntity player;
|
|
|
+
|
|
|
+ @Column(name = "creation_date", nullable = false)
|
|
|
+ private Timestamp creationDate;
|
|
|
+
|
|
|
+ @Column(name = "name", nullable = false, length = 50)
|
|
|
+ private String name;
|
|
|
+
|
|
|
+ @Column(name = "comment")
|
|
|
+ private String comment;
|
|
|
+
|
|
|
+ @Column(name = "mech_1_id")
|
|
|
+ private Integer mech1Id;
|
|
|
+
|
|
|
+ @Column(name = "mech_2_id")
|
|
|
+ private Integer mech2Id;
|
|
|
+
|
|
|
+ @Column(name = "mech_3_id")
|
|
|
+ private Integer mech3Id;
|
|
|
+
|
|
|
+ public Long getId() {
|
|
|
+ return id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public PlayerEntity getPlayer() {
|
|
|
+ return player;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Timestamp getCreationDate() {
|
|
|
+ return creationDate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getName() {
|
|
|
+ return name;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setName(String name) {
|
|
|
+ this.name = name;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getComment() {
|
|
|
+ return comment;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setComment(String comment) {
|
|
|
+ this.comment = comment;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getMech1Id() {
|
|
|
+ return mech1Id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMech1Id(Integer mech1Id) {
|
|
|
+ this.mech1Id = mech1Id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getMech2Id() {
|
|
|
+ return mech2Id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMech2Id(Integer mech2Id) {
|
|
|
+ this.mech2Id = mech2Id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getMech3Id() {
|
|
|
+ return mech3Id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMech3Id(Integer mech3Id) {
|
|
|
+ this.mech3Id = mech3Id;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|