- Timestamp:
- 12/26/23 18:50:43 (10 months ago)
- Branches:
- master
- Children:
- 1413ee2
- Parents:
- 950fa0d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/edu/gjoko/schedlr/entity/Appointment.java
-
Property mode
changed from
100644
to100755
r950fa0d r77205be 1 1 package edu.gjoko.schedlr.entity; 2 2 3 import lombok.AllArgsConstructor; 4 import lombok.Getter; 5 import lombok.NoArgsConstructor; 6 import lombok.Setter; 3 import com.fasterxml.jackson.annotation.JsonBackReference; 4 import lombok.*; 7 5 import org.springframework.data.annotation.LastModifiedDate; 8 6 import org.springframework.data.jpa.domain.support.AuditingEntityListener; … … 14 12 @EntityListeners(AuditingEntityListener.class) 15 13 @Table(name = "appointment") 16 @Getter 17 @Setter 14 @Data 18 15 @NoArgsConstructor 19 16 @AllArgsConstructor … … 30 27 private LocalDateTime endTime; 31 28 32 @OneToOne 33 @JoinColumn(name = "customer_id", referencedColumnName = "id") 29 @ManyToOne 30 @JoinColumn(name = "stakeholder_id") 31 @JsonBackReference(value = "customerAppointments") 34 32 private Stakeholder customer; 35 33 36 34 @ManyToOne 37 @JoinColumn(name = "business_id") 38 private Business business; 35 @JoinColumn(name = "service_id") 36 @JsonBackReference(value = "serviceAppointments") 37 private Service service; 39 38 40 @ ManyToOne41 @ JoinColumn(name = "service_id")42 private Service service;39 @Column(name = "appointment_status", length = 32, columnDefinition = "varchar(32) default 'NEW'") 40 @Enumerated(EnumType.STRING) 41 private AppointmentStatus appointmentStatus = AppointmentStatus.NEW; 43 42 44 43 @Column(name = "created") … … 49 48 @LastModifiedDate 50 49 private LocalDateTime modified; 50 51 public String getTimePeriod() { 52 return startTime + " - " + endTime; 53 } 54 51 55 } -
Property mode
changed from
Note:
See TracChangeset
for help on using the changeset viewer.