change price to BigDecimals
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
package fr.tetelie.crawler.web;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity
|
||||
@ -10,7 +12,7 @@ public class PriceHistory {
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
|
||||
private Float price;
|
||||
private BigDecimal price;
|
||||
|
||||
@Column(name = "checked_at")
|
||||
private LocalDateTime dateCheck;
|
||||
@ -20,6 +22,6 @@ public class PriceHistory {
|
||||
private Product product;
|
||||
|
||||
// Getters & Setters
|
||||
public Float getPrice() { return price; }
|
||||
public BigDecimal getPrice() { return price; }
|
||||
public LocalDateTime getDateCheck() { return dateCheck; }
|
||||
}
|
||||
Reference in New Issue
Block a user