Move to new server
This commit is contained in:
49
src/main/java/nl/connectedit/swiss/domain/entity/Match.java
Normal file
49
src/main/java/nl/connectedit/swiss/domain/entity/Match.java
Normal file
@@ -0,0 +1,49 @@
|
||||
package nl.connectedit.swiss.domain.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import nl.connectedit.swiss.domain.EventType;
|
||||
import nl.connectedit.swiss.domain.Status;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
@Table
|
||||
@Getter
|
||||
@Setter
|
||||
@RequiredArgsConstructor
|
||||
public class Match extends AbstractEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
private EventType type;
|
||||
|
||||
private Status status;
|
||||
|
||||
@ManyToOne
|
||||
private Round round;
|
||||
|
||||
@ManyToOne
|
||||
private Team team1;
|
||||
|
||||
@ManyToOne
|
||||
private Team team2;
|
||||
|
||||
private Boolean played;
|
||||
|
||||
private Long court;
|
||||
|
||||
@OneToMany(cascade = CascadeType.MERGE, fetch = FetchType.LAZY)
|
||||
private List<Game> games;// = new ArrayList<>();
|
||||
|
||||
private LocalDateTime startTime;
|
||||
|
||||
private LocalDateTime endTime;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user