Webshops refactoring + checkstyle

This commit is contained in:
Leonie Eitze
2023-06-27 02:56:28 +02:00
parent 22ee3f3d34
commit 463932f8e9
24 changed files with 168 additions and 208 deletions

View File

@@ -14,36 +14,37 @@ public class OfferDTO {
*/
private String offerId;
/*
* The product that our software buys
/**
* The product that our software buys.
*/
Product sourceProduct;
private Product sourceProduct;
/*
* The product that our software sells
/**
* The product that our software sells.
*/
Product saleProduct;
private Product saleProduct;
/*
/**
* Date of the creation of the offer
* NOTE: Use Timestamp? https://docs.oracle.com/javase/8/docs/api/java/sql/Timestamp.html
* NOTE: Use Timestamp?
* https://docs.oracle.com/javase/8/docs/api/java/sql/Timestamp.html
*/
Date creationDate;
private Date creationDate;
/*
* Date of last update of the offer on the destination website (API)
/**
* Date of last update of the offer on the destination website (API).
*/
Date upDate;
private Date upDate;
/*
* Date of last check if offer is still valid
/**
* Date of last check if offer is still valid.
*/
Date checkDate;
private Date checkDate;
/**
* Creates OfferDTO instance.
*
* @param newOfferId Internal Offer identifier
* @param newOfferId Internal Offer identifier
*/
public OfferDTO(final String newOfferId) {
this.offerId = newOfferId;

View File

@@ -1,5 +1,6 @@
package de.rwu.easydrop.api.dto;
import de.rwu.easydrop.model.Webshop;
import lombok.Data;
/**
@@ -10,9 +11,9 @@ import lombok.Data;
@Data
public class ProductDTO {
/**
* Data source platform, like "Amazon".
* Data source platform, like Amazon.
*/
private String dataOrigin;
private Webshop dataOrigin;
/**
* Platform internal product identifier.
@@ -45,7 +46,7 @@ public class ProductDTO {
* @param newProductId Internal Product indetifier
* @param newDataOrigin Data Origin
*/
public ProductDTO(final String newProductId, final String newDataOrigin) {
public ProductDTO(final String newProductId, final Webshop newDataOrigin) {
this.productId = newProductId;
this.dataOrigin = newDataOrigin;
}