-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Committer: Sebastian Jitaru <[email protected]>
- Loading branch information
nero
committed
Feb 20, 2024
1 parent
8e4d094
commit dbb0c9d
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
src/main/java/cat/udl/eps/softarch/demo/domain/Schedule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package cat.udl.eps.softarch.demo.domain; | ||
|
||
import jakarta.persistence.*; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.PastOrPresent; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@Entity | ||
@Table(name = "Schedule") //Avoid collision with system table User | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
|
||
public class Schedule extends UriEntity<Long> { | ||
|
||
@Id | ||
private Integer id; | ||
|
||
@NotNull | ||
private LocalDateTime start; | ||
|
||
@NotNull | ||
private LocalDateTime end; | ||
|
||
public LocalDateTime getStart() { | ||
return start; | ||
} | ||
|
||
public LocalDateTime getEnd() { | ||
return end; | ||
} | ||
} |