-
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.
Merge pull request #5 from UdL-EPS-SoftArch/crud-Adoptions
Adoptions class
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
32 changes: 32 additions & 0 deletions
32
src/main/java/cat/udl/eps/softarch/demo/domain/Adoptions.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,32 @@ | ||
package cat.udl.eps.softarch.demo.domain; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.Id; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import java.time.LocalDateTime; | ||
|
||
|
||
@Setter | ||
@Getter | ||
@Entity | ||
@Data | ||
@EqualsAndHashCode (callSuper = false) | ||
|
||
public class Adoptions { | ||
@NotNull | ||
@NotBlank | ||
private LocalDateTime dateOfAdoption; | ||
@Id | ||
@GeneratedValue | ||
private int id; | ||
|
||
public Adoptions() { | ||
this.dateOfAdoption = LocalDateTime.now(); | ||
} | ||
|
||
} |