Changeset feffc2f for src/main/java/com/example/autopartz/model
- Timestamp:
- 01/03/23 19:29:20 (23 months ago)
- Branches:
- main
- Children:
- 60de3eb
- Parents:
- eaf0f1b
- Location:
- src/main/java/com/example/autopartz/model
- Files:
-
- 4 edited
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/autopartz/model/Part.java
reaf0f1b rfeffc2f 18 18 public class Part { 19 19 @Id 20 Long ID_part; 21 String part_name; 22 String part_description; 20 @Column(name = "ID_part") 21 Long id; 22 @Column(name = "part_name") 23 String name; 24 @Column(name = "part_description") 25 String description; 23 26 @ManyToOne 24 27 @JoinColumn(name = "id_part_manufacturer") 25 PartManufacturer partManufacturer;28 PartManufacturer manufacturer; 26 29 @ManyToMany 27 30 @JoinTable(name = "part_is_from_category", joinColumns = … … 48 51 if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false; 49 52 Part part = (Part) o; 50 return ID_part != null && Objects.equals(ID_part, part.ID_part);53 return id != null && Objects.equals(id, part.id); 51 54 } 52 55 -
src/main/java/com/example/autopartz/model/PartManufacturer.java
reaf0f1b rfeffc2f 1 1 package com.example.autopartz.model; 2 2 3 import jakarta.persistence.Column; 3 4 import jakarta.persistence.Entity; 4 5 import jakarta.persistence.Id; … … 18 19 @Id 19 20 Long ID_part_manufacturer; 20 String pm_name; 21 @Column(name = "pm_name") 22 String name; 21 23 String pm_location; 22 24 -
src/main/java/com/example/autopartz/model/RepairShop.java
reaf0f1b rfeffc2f 16 16 public class RepairShop { 17 17 @Id 18 Long ID_repair_shop; 19 String rs_name; 20 String rs_location; 21 String rs_phone_number; 18 @Column(name = "ID_repair_shop") 19 Long id; 20 @Column(name = "rs_name") 21 String name; 22 @Column(name = "rs_location") 23 String location; 24 @Column(name = "rs_phone_number") 25 String number; 22 26 @ManyToMany 23 27 @JoinTable(name = "repair_shop_is_authorized_for_car_make", joinColumns = … … 32 36 if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false; 33 37 RepairShop that = (RepairShop) o; 34 return ID_repair_shop != null && Objects.equals(ID_repair_shop, that.ID_repair_shop);38 return id != null && Objects.equals(id, that.id); 35 39 } 36 40 -
src/main/java/com/example/autopartz/model/User.java
reaf0f1b rfeffc2f 21 21 String email; 22 22 String name_user; 23 String password_user; 23 @Column(name = "password_user") 24 String password; 24 25 LocalDateTime user_created_on; 25 26 String phone_number; … … 27 28 @JoinColumn(name = "id_administrator") 28 29 Administrator administrator; 30 31 public User(String username, String name, String email, String password, String number) { 32 this.username = username; 33 this.name_user = name; 34 this.email = email; 35 this.password = password; 36 this.phone_number = number; 37 this.user_created_on = LocalDateTime.now(); 38 } 29 39 30 40 @Override -
src/main/java/com/example/autopartz/model/views/OrdersForUser.java
reaf0f1b rfeffc2f 1 package com.example.autopartz.model ;1 package com.example.autopartz.model.views; 2 2 3 3 import jakarta.persistence.Entity; … … 6 6 import jakarta.persistence.Table; 7 7 import lombok.*; 8 import org.hibernate.Hibernate;9 8 import org.hibernate.annotations.Immutable; 10 import org.hibernate.annotations.Subselect;11 9 12 10 import java.io.Serial; 13 11 import java.io.Serializable; 14 import java.time.LocalDate;15 12 import java.time.LocalDateTime; 16 import java.util.Objects;17 13 18 14 // извештај за сите сервиси и за сите број на reviews и avg рејтинг -
src/main/java/com/example/autopartz/model/views/OrdersForUserId.java
reaf0f1b rfeffc2f 1 package com.example.autopartz.model ;1 package com.example.autopartz.model.views; 2 2 3 3 import lombok.Data; -
src/main/java/com/example/autopartz/model/views/PartsForCarTypeAndCategory.java
reaf0f1b rfeffc2f 1 package com.example.autopartz.model ;1 package com.example.autopartz.model.views; 2 2 3 3 import jakarta.persistence.Entity; -
src/main/java/com/example/autopartz/model/views/RepairShopReviewsSummary.java
reaf0f1b rfeffc2f 1 package com.example.autopartz.model ;1 package com.example.autopartz.model.views; 2 2 3 3 import jakarta.persistence.Entity; … … 7 7 import org.hibernate.Hibernate; 8 8 import org.hibernate.annotations.Immutable; 9 import org.hibernate.annotations.Subselect;10 9 11 10 import java.io.Serial; -
src/main/java/com/example/autopartz/model/views/RepairsForUser.java
reaf0f1b rfeffc2f 1 package com.example.autopartz.model ;1 package com.example.autopartz.model.views; 2 2 3 3 import jakarta.persistence.Entity; … … 5 5 import jakarta.persistence.IdClass; 6 6 import jakarta.persistence.Table; 7 import lombok.*; 8 import org.hibernate.Hibernate; 7 import lombok.Getter; 8 import lombok.RequiredArgsConstructor; 9 import lombok.Setter; 10 import lombok.ToString; 9 11 import org.hibernate.annotations.Immutable; 10 import org.hibernate.annotations.Subselect;11 12 12 13 import java.io.Serial; 13 14 import java.io.Serializable; 14 import java.time.LocalDate;15 15 import java.time.LocalDateTime; 16 import java.util.Objects;17 16 18 17 // извештај за сите сервиси и за сите број на reviews и avg рејтинг -
src/main/java/com/example/autopartz/model/views/ReviewsForUser.java
reaf0f1b rfeffc2f 1 package com.example.autopartz.model ;1 package com.example.autopartz.model.views; 2 2 3 3 import jakarta.persistence.Entity; 4 4 import jakarta.persistence.Id; 5 import jakarta.persistence.IdClass;6 5 import jakarta.persistence.Table; 7 import lombok.*; 8 import org.hibernate.Hibernate; 6 import lombok.Getter; 7 import lombok.RequiredArgsConstructor; 8 import lombok.Setter; 9 import lombok.ToString; 9 10 import org.hibernate.annotations.Immutable; 10 import org.hibernate.annotations.Subselect;11 11 12 12 import java.io.Serial; 13 13 import java.io.Serializable; 14 import java.time.LocalDate;15 import java.time.LocalDateTime;16 import java.util.Objects;17 14 18 15 // извештај за сите сервиси и за сите број на reviews и avg рејтинг
Note:
See TracChangeset
for help on using the changeset viewer.