Wrote OfferWriter and following classes to save offers to persistence
This commit is contained in:
51
src/main/java/de/rwu/easydrop/api/dto/OfferDTO.java
Normal file
51
src/main/java/de/rwu/easydrop/api/dto/OfferDTO.java
Normal file
@@ -0,0 +1,51 @@
|
||||
package de.rwu.easydrop.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import de.rwu.easydrop.model.Product;
|
||||
import java.util.Date;
|
||||
|
||||
/*
|
||||
* Offer data transfer object
|
||||
*/
|
||||
@Data
|
||||
public class OfferDTO {
|
||||
/**
|
||||
* Platform internal offer identifier.
|
||||
*/
|
||||
private String offerId;
|
||||
|
||||
/*
|
||||
* The product that our software buys
|
||||
*/
|
||||
Product sourceProduct;
|
||||
|
||||
/*
|
||||
* The product that our software sells
|
||||
*/
|
||||
Product saleProduct;
|
||||
|
||||
/*
|
||||
* Date of the creation of the offer
|
||||
* NOTE: Use Timestamp? https://docs.oracle.com/javase/8/docs/api/java/sql/Timestamp.html
|
||||
*/
|
||||
Date creationDate;
|
||||
|
||||
/*
|
||||
* Date of last update of the offer on the destination website (API)
|
||||
*/
|
||||
Date upDate;
|
||||
|
||||
/*
|
||||
* Date of last check if offer is still valid
|
||||
*/
|
||||
Date checkDate;
|
||||
|
||||
/**
|
||||
* Creates OfferDTO instance.
|
||||
*
|
||||
* @param newOfferId Internal Offer identifier
|
||||
*/
|
||||
public OfferDTO(final String newOfferId) {
|
||||
this.offerId = newOfferId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user