Skip to content

Commit

Permalink
Added annotations
Browse files Browse the repository at this point in the history
-Mario Fernandez
-Àlex Codina
  • Loading branch information
Codinab committed Feb 22, 2024
1 parent 8da823a commit c1ebda5
Showing 1 changed file with 17 additions and 47 deletions.
64 changes: 17 additions & 47 deletions src/main/java/cat/udl/eps/softarch/demo/domain/Adoption.java
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;
}

0 comments on commit c1ebda5

Please sign in to comment.