Connected application components

This commit is contained in:
Marvin Scham
2023-06-27 05:23:43 +02:00
parent b78fb49eb1
commit d01c4d0b1d
31 changed files with 402 additions and 561 deletions

View File

@@ -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;
}

View File

@@ -40,6 +40,11 @@ public class ProductDTO {
*/
private boolean available;
/**
* Last update from API.
*/
private String lastUpdate;
/**
* Creates ProductDTO instance.
*