Close chat #169
@@ -18,6 +18,8 @@ public class StoreRequest {
|
||||
@Email(message = "Email must be valid")
|
||||
private String email;
|
||||
|
||||
private String imageUrl;
|
||||
|
||||
public String getStoreName() {
|
||||
return storeName;
|
||||
}
|
||||
@@ -50,6 +52,14 @@ public class StoreRequest {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public void setImageUrl(String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -58,12 +68,13 @@ public class StoreRequest {
|
||||
return Objects.equals(storeName, that.storeName) &&
|
||||
Objects.equals(address, that.address) &&
|
||||
Objects.equals(phone, that.phone) &&
|
||||
Objects.equals(email, that.email);
|
||||
Objects.equals(email, that.email) &&
|
||||
Objects.equals(imageUrl, that.imageUrl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(storeName, address, phone, email);
|
||||
return Objects.hash(storeName, address, phone, email, imageUrl);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -73,6 +84,7 @@ public class StoreRequest {
|
||||
", address='" + address + '\'' +
|
||||
", phone='" + phone + '\'' +
|
||||
", email='" + email + '\'' +
|
||||
", imageUrl='" + imageUrl + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,17 +9,19 @@ public class StoreResponse {
|
||||
private String address;
|
||||
private String phone;
|
||||
private String email;
|
||||
private String imageUrl;
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
public StoreResponse() {
|
||||
}
|
||||
|
||||
public StoreResponse(Long storeId, String storeName, String address, String phone, String email, LocalDateTime createdAt) {
|
||||
public StoreResponse(Long storeId, String storeName, String address, String phone, String email, String imageUrl, LocalDateTime createdAt) {
|
||||
this.storeId = storeId;
|
||||
this.storeName = storeName;
|
||||
this.address = address;
|
||||
this.phone = phone;
|
||||
this.email = email;
|
||||
this.imageUrl = imageUrl;
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
@@ -63,6 +65,14 @@ public class StoreResponse {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public void setImageUrl(String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,9 @@ public class StoreLocation {
|
||||
@Column(nullable = false, length = 100)
|
||||
private String email;
|
||||
|
||||
@Column(length = 500)
|
||||
private String imageUrl;
|
||||
|
||||
@CreationTimestamp
|
||||
@Column(name = "created_at", updatable = false)
|
||||
private LocalDateTime createdAt;
|
||||
@@ -89,6 +92,14 @@ public class StoreLocation {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public void setImageUrl(String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedAt() {
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ public class StoreService {
|
||||
store.setAddress(request.getAddress());
|
||||
store.setPhone(request.getPhone());
|
||||
store.setEmail(request.getEmail());
|
||||
store.setImageUrl(request.getImageUrl());
|
||||
|
||||
store = storeRepository.save(store);
|
||||
return mapToResponse(store);
|
||||
@@ -57,6 +58,7 @@ public class StoreService {
|
||||
store.setAddress(request.getAddress());
|
||||
store.setPhone(request.getPhone());
|
||||
store.setEmail(request.getEmail());
|
||||
store.setImageUrl(request.getImageUrl());
|
||||
|
||||
store = storeRepository.save(store);
|
||||
return mapToResponse(store);
|
||||
@@ -82,6 +84,7 @@ public class StoreService {
|
||||
store.getAddress(),
|
||||
store.getPhone(),
|
||||
store.getEmail(),
|
||||
store.getImageUrl(),
|
||||
store.getCreatedAt()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user