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