Skip to content

Commit

Permalink
Merge branch 'main' into 112-backend-support-for-uploading-and-storin…
Browse files Browse the repository at this point in the history
…g-images-associated-with-apartments
  • Loading branch information
AbdeDevs committed Dec 15, 2024
2 parents dde1763 + 3cf3eba commit df3953b
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 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,34 @@ 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 = Status.PENDING;

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

private final String value;

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

public String getValue() {
return value;
}
}


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

0 comments on commit df3953b

Please sign in to comment.