Changeset d4b888e for src/main/java/com/example/autopartz/model
- Timestamp:
- 01/06/23 15:26:00 (23 months ago)
- Branches:
- main
- Children:
- 9dcbf44
- Parents:
- f484b14
- Location:
- src/main/java/com/example/autopartz/model
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/autopartz/model/Repair.java
rf484b14 rd4b888e 18 18 @Id 19 19 @GeneratedValue(strategy = GenerationType.IDENTITY) 20 Integer ID_repair; 20 @Column(name = "ID_repair") 21 Integer id; 21 22 @OneToOne 22 23 @JoinColumn(name = "id_order") … … 34 35 this.serviceBook = serviceBook; 35 36 } 36 37 37 @Override 38 38 public boolean equals(Object o) { … … 40 40 if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false; 41 41 Repair repair = (Repair) o; 42 return ID_repair != null && Objects.equals(ID_repair, repair.ID_repair);42 return id != null && Objects.equals(id, repair.id); 43 43 } 44 44 -
src/main/java/com/example/autopartz/model/Review.java
rf484b14 rd4b888e 7 7 import org.hibernate.Hibernate; 8 8 9 import javax.persistence.Entity; 10 import javax.persistence.Id; 11 import javax.persistence.JoinColumn; 12 import javax.persistence.ManyToOne; 9 import javax.persistence.*; 13 10 import java.util.Objects; 14 11 … … 20 17 public class Review { 21 18 @Id 19 @GeneratedValue(strategy = GenerationType.IDENTITY) 22 20 Integer ID_review; 23 21 Integer review_rating; … … 29 27 @JoinColumn(name = "id_user") 30 28 Client client; 29 30 public Review(Integer review_rating, String review_comment, Repair repair, Client client) { 31 this.review_rating = review_rating; 32 this.review_comment = review_comment; 33 this.repair = repair; 34 this.client = client; 35 } 31 36 32 37 @Override -
src/main/java/com/example/autopartz/model/views/RepairsForUser.java
rf484b14 rd4b888e 23 23 @Immutable 24 24 @Table(name = "`repairs_for_user`") 25 @IdClass(OrdersForUserId.class)26 25 public class RepairsForUser implements Serializable { 27 26 @Serial 28 27 private static final long serialVersionUID = 1L; 29 28 @Id 29 Integer repairid; 30 30 Integer userid; 31 @Id32 31 LocalDateTime orderdate; 33 @Id34 String partname;35 32 Integer orderid; 36 33 String rsname;
Note:
See TracChangeset
for help on using the changeset viewer.