Skip to content

Commit

Permalink
User and status added to visit
Browse files Browse the repository at this point in the history
  • Loading branch information
PauBarahona22 committed Dec 11, 2024
1 parent 4183936 commit e3bbbf2
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion src/main/java/cat/udl/eps/softarch/demo/domain/Visit.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,33 @@ public class Visit extends UriEntity<Long> {
@Column(name = "visit_date")
private ZonedDateTime when;

@ManyToOne
@JoinColumn(name = "username_id")
private User username;

// Setter
// Getter
@Setter
@Getter
@NotNull
private Status status;

public enum Status {
PENDING("pending"),
ACCEPTED("accepted"),
REJECTED("rejected");

private final String value;

Status(String value) {
this.value = value;
}

public String getValue() {
return value;
}
}


@ManyToOne
@NotNull
Expand All @@ -34,4 +61,5 @@ public class Visit extends UriEntity<Long> {
public void setVisitDateTime(ZonedDateTime parse) {
this.when = parse;
}
}
}

0 comments on commit e3bbbf2

Please sign in to comment.