rework ui
This commit is contained in:
@@ -40,6 +40,12 @@ public class Customer extends AbstractDateEntity {
|
||||
|
||||
@Column(name = "name", nullable = false)
|
||||
private String name;
|
||||
|
||||
@Column(name = "city")
|
||||
private String city;
|
||||
|
||||
@Column(name = "zip")
|
||||
private String zip;
|
||||
|
||||
@OneToMany(mappedBy = "customer", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
private Set<Picture> pictures = new HashSet<>();
|
||||
@@ -68,6 +74,22 @@ public class Customer extends AbstractDateEntity {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getZip() {
|
||||
return zip;
|
||||
}
|
||||
|
||||
public void setZip(String zip) {
|
||||
this.zip = zip;
|
||||
}
|
||||
|
||||
public Set<Picture> getPictures() {
|
||||
return pictures;
|
||||
}
|
||||
@@ -101,6 +123,16 @@ public class Customer extends AbstractDateEntity {
|
||||
instance.setName(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder city(String city) {
|
||||
instance.setCity(city);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder zip(String zip) {
|
||||
instance.setZip(zip);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Customer build() {
|
||||
return instance;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
-- customer
|
||||
|
||||
alter table customer add column zip varchar(150);
|
||||
|
||||
alter table customer add column city varchar(150);
|
||||
|
||||
Reference in New Issue
Block a user