Connected application components
This commit is contained in:
@@ -1,52 +1,31 @@
|
||||
package de.rwu.easydrop.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import de.rwu.easydrop.model.Product;
|
||||
import java.util.Date;
|
||||
|
||||
/*
|
||||
* Offer data transfer object
|
||||
* Offer data transfer object.
|
||||
*
|
||||
* @since 0.3.0
|
||||
*/
|
||||
@Data
|
||||
public class OfferDTO {
|
||||
/**
|
||||
* Platform internal offer identifier.
|
||||
* ID of the offer, built from identifiers of the source platforms.
|
||||
*/
|
||||
private String offerId;
|
||||
|
||||
/**
|
||||
* The product that our software buys.
|
||||
*/
|
||||
private Product sourceProduct;
|
||||
private ProductDTO sourceProduct;
|
||||
|
||||
/**
|
||||
* The product that our software sells.
|
||||
*/
|
||||
private Product saleProduct;
|
||||
private ProductDTO targetProduct;
|
||||
|
||||
/**
|
||||
* Date of the creation of the offer
|
||||
* NOTE: Use Timestamp?
|
||||
* https://docs.oracle.com/javase/8/docs/api/java/sql/Timestamp.html
|
||||
* Date of last update of the offer.
|
||||
*/
|
||||
private Date creationDate;
|
||||
|
||||
/**
|
||||
* Date of last update of the offer on the destination website (API).
|
||||
*/
|
||||
private Date upDate;
|
||||
|
||||
/**
|
||||
* Date of last check if offer is still valid.
|
||||
*/
|
||||
private Date checkDate;
|
||||
|
||||
/**
|
||||
* Creates OfferDTO instance.
|
||||
*
|
||||
* @param newOfferId Internal Offer identifier
|
||||
*/
|
||||
public OfferDTO(final String newOfferId) {
|
||||
this.offerId = newOfferId;
|
||||
}
|
||||
private String lastUpdate;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,11 @@ public class ProductDTO {
|
||||
*/
|
||||
private boolean available;
|
||||
|
||||
/**
|
||||
* Last update from API.
|
||||
*/
|
||||
private String lastUpdate;
|
||||
|
||||
/**
|
||||
* Creates ProductDTO instance.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user