-
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.
-Mario Fernandez -Àlex Codina
- Loading branch information
Showing
1 changed file
with
17 additions
and
47 deletions.
There are no files selected for viewing
64 changes: 17 additions & 47 deletions
64
src/main/java/cat/udl/eps/softarch/demo/domain/Adoption.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 |
---|---|---|
@@ -1,58 +1,28 @@ | ||
package cat.udl.eps.softarch.demo.domain; | ||
|
||
import jakarta.persistence.Id; | ||
import jakarta.validation.constraints.NotBlank; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
import java.util.Date; | ||
|
||
@EqualsAndHashCode(callSuper = true) | ||
@Data | ||
public class Adoption extends UriEntity<Long> { | ||
private final Long id; | ||
|
||
@Id | ||
private Long id; | ||
|
||
@NotBlank | ||
private String type; | ||
|
||
@NotBlank | ||
private Boolean confirmed; | ||
|
||
@NotBlank | ||
private Date startDate; | ||
private Date endDate; | ||
|
||
// Constructor | ||
public Adoption(Long id, String type, Boolean confirmed, Date startDate, Date endDate) { | ||
this.id = id; | ||
this.type = type; | ||
this.confirmed = confirmed; | ||
this.startDate = startDate; | ||
this.endDate = endDate; | ||
} | ||
|
||
// Getters and Setters | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
public Boolean getConfirmed() { | ||
return confirmed; | ||
} | ||
|
||
public void setConfirmed(Boolean confirmed) { | ||
this.confirmed = confirmed; | ||
} | ||
|
||
public Date getStartDate() { | ||
return startDate; | ||
} | ||
|
||
public void setStartDate(Date startDate) { | ||
this.startDate = startDate; | ||
} | ||
|
||
public Date getEndDate() { | ||
return endDate; | ||
} | ||
|
||
public void setEndDate(Date endDate) { | ||
this.endDate = endDate; | ||
} | ||
private Date endDate; | ||
} |