StoreResponse.java
package com.fulfilment.application.monolith.stores.dto;
import com.fulfilment.application.monolith.stores.Store;
/** Outbound DTO for store responses — exposes only safe, intended fields. */
public class StoreResponse {
public Long id;
public String name;
public int quantityProductsInStock;
public static StoreResponse from(Store store) {
StoreResponse response = new StoreResponse();
response.id = store.id;
response.name = store.name;
response.quantityProductsInStock = store.quantityProductsInStock;
return response;
}
}