Merge branch 'Api_next-step2' of https://codefirst.iut.uca.fr/git/BowlDev/Bowl_in into Api_next-step2
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
# Conflicts: # Sources/API/Quarkus/src/main/java/org/acme/Hibernates/entities/GameEntity.javaArthur_API-Users
commit
dfb8bc70bc
@ -0,0 +1,39 @@
|
||||
package org.acme.Hibernates.entities;
|
||||
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
@Table(name="user_stats")
|
||||
public class UserStatsEntity {
|
||||
@Id
|
||||
private Long id;
|
||||
@MapsId
|
||||
@OneToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn (name = "user_id", referencedColumnName = "id", insertable = false, updatable = false)
|
||||
private UserEntity user;
|
||||
@ColumnDefault("0")
|
||||
private Long nbVictories = 0L;
|
||||
@ColumnDefault("0")
|
||||
private Long nbGames = 0L;
|
||||
@ColumnDefault("0")
|
||||
private Long highscore = 0L;
|
||||
@ColumnDefault("0")
|
||||
private Long nbStrikes = 0L;
|
||||
@ColumnDefault("0")
|
||||
private Long nbSpares = 0L;
|
||||
@ColumnDefault("-1")
|
||||
private double avgScore = -1;
|
||||
@ColumnDefault("-1")
|
||||
private double avgPinsPerRound = -1;
|
||||
|
||||
public UserStatsEntity() {
|
||||
}
|
||||
|
||||
public UserStatsEntity(UserEntity user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
INSERT INTO userentity(id, name,password) VALUES (nextval('hibernate_sequence'), 'Emre','Emre');
|
||||
INSERT INTO userentity(id, name,password) VALUES (nextval('hibernate_sequence'), 'Arthur','Arthur');
|
||||
INSERT INTO userentity(id, name,password) VALUES (nextval('hibernate_sequence'), 'Lucas','Lucas');
|
||||
INSERT INTO userentity(id, name,password) VALUES (nextval('hibernate_sequence'), 'Louison','Louison');
|
||||
INSERT INTO users(id, name,password) VALUES (nextval('hibernate_sequence'), 'Emre','Emre');
|
||||
INSERT INTO users(id, name,password) VALUES (nextval('hibernate_sequence'), 'Arthur','Arthur');
|
||||
INSERT INTO users(id, name,password) VALUES (nextval('hibernate_sequence'), 'Lucas','Lucas');
|
||||
INSERT INTO users(id, name,password) VALUES (nextval('hibernate_sequence'), 'Louison','Louison');
|
||||
|
Loading…
Reference in new issue