@@ -0,0 +1,1232 @@
+package bg.car_wash.entities;%0A%0Aimport javax.persistence.*;%0Aimport javax.validation.constraints.Size;%0Aimport java.util.Date;%0Aimport java.util.List;%0A%0A@Entity%0A@Table(name = %22customers%22)%0Apublic class Customer %7B%0A%0A%09@Id%0A%09@GeneratedValue(strategy = GenerationType.IDENTITY)%0A%09private Long id;%0A%0A%09@Column(name = %22name%22, nullable = false)%0A%09@Size(min = 3, max = 100)%0A%09private String name;%0A%0A%09@Column(name = %22phone_number%22, nullable = false)%0A%09@Size(min = 10, max = 15)%0A%09private String phoneNumber;%0A%0A%09@Basic%0A%09private Date date;%0A%0A%09@Basic%0A%09private int discount;%0A%0A%09@OneToMany(targetEntity = Car.class, cascade = CascadeType.ALL)%0A%09private List%3CCar%3E cars;%0A%0A%09public Customer() %7B%0A%09%7D%0A%0A%09public Long getId() %7B%0A%09%09return id;%0A%09%7D%0A%0A%09public void setId(Long id) %7B%0A%09%09this.id = id;%0A%09%7D%0A%0A%09public String getName() %7B%0A%09%09return name;%0A%09%7D%0A%0A%09public void setName(String name) %7B%0A%09%09this.name = name;%0A%09%7D%0A%0A%09public String getPhoneNumber() %7B%0A%09%09return phoneNumber;%0A%09%7D%0A%0A%09public void setPhoneNumber(String phoneNumber) %7B%0A%09%09this.phoneNumber = phoneNumber;%0A%09%7D%0A%0A%09public Date getDate() %7B%0A%09%09return date;%0A%09%7D%0A%0A%09public void setDate(Date date) %7B%0A%09%09this.date = date;%0A%09%7D%0A%0A%09public int getDiscount() %7B%0A%09%09return discount;%0A%09%7D%0A%0A%09public void setDiscount(int discount) %7B%0A%09%09this.discount = discount;%0A%09%7D%0A%7D%0A

create customer entity