-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMatch.java
More file actions
47 lines (40 loc) · 1.14 KB
/
Match.java
File metadata and controls
47 lines (40 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package cat.udl.eps.softarch.demo.domain;
import java.time.LocalDateTime;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@Entity
@Table(name = "competition_match")
@Getter
@Setter
@EqualsAndHashCode(callSuper = true, onlyExplicitlyIncluded = true)
public class Match extends UriEntity<Long> {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@EqualsAndHashCode.Include
private Long id;
@NotNull
@Column(nullable = false)
private LocalDateTime startTime;
@NotNull
@Column(nullable = false)
private LocalDateTime endTime;
@NotNull
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private MatchState state;
@ManyToOne
@JoinColumn(name = "referee_id")
private Referee referee;
}