Changeset 77205be for src/main/java/edu/gjoko/schedlr/entity/Service.java
- 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/Service.java
-
Property mode
changed from
100644
to100755
r950fa0d r77205be 3 3 import com.fasterxml.jackson.annotation.JsonBackReference; 4 4 import com.fasterxml.jackson.annotation.JsonIgnore; 5 import com.fasterxml.jackson.annotation.JsonManagedReference; 5 6 import lombok.AllArgsConstructor; 6 7 import lombok.Getter; … … 13 14 import javax.persistence.*; 14 15 import java.time.LocalDateTime; 16 import java.util.List; 15 17 16 18 @Entity … … 33 35 private Integer price; 34 36 35 @OneToOne(cascade = CascadeType.PERSIST) 37 @Column(name = "cumulated_rating") 38 private Float rating = 0.0f; 39 40 @Column(name = "reviews_count") 41 private Integer reviewsCount = 0; 42 43 @OneToOne(cascade = CascadeType.MERGE) 36 44 @JoinColumn(name = "service_type_id", referencedColumnName = "id") 37 45 private ServiceType serviceType; … … 39 47 @ManyToOne 40 48 @JoinColumn(name = "business_id") 41 @JsonBackReference 49 @JsonBackReference(value = "services") 42 50 private Business business; 51 52 @OneToMany(mappedBy="service") 53 @JsonManagedReference(value = "serviceAppointments") 54 private List<Appointment> appointments; 43 55 44 56 @Column(name = "created") -
Property mode
changed from
Note:
See TracChangeset
for help on using the changeset viewer.