count -> quantity, bigdesimals

1 parent d5470a06
package fi.insomnia.bortal.model;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
......@@ -13,7 +14,7 @@ import org.eclipse.persistence.annotations.OptimisticLocking;
import org.eclipse.persistence.annotations.OptimisticLockingType;
@Entity
@Table(name = "inventory_event")
@Table(name = "inventory_events")
@OptimisticLocking(type = OptimisticLockingType.CHANGED_COLUMNS)
public class InventoryEvent extends GenericEntity {
private static final long serialVersionUID = 1L;
......@@ -41,22 +42,14 @@ public class InventoryEvent extends GenericEntity {
this.info = info;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
@JoinColumn(name = "product_id")
private Product product;
@Column(name = "info", nullable = true)
private String info;
@Column(name = "count", nullable=false)
private int count;
@Column(name = "quantity", nullable = false, precision = 24, scale = 4)
private BigDecimal quantity;
......@@ -76,5 +69,13 @@ public class InventoryEvent extends GenericEntity {
this.created = created;
}
public BigDecimal getQuantity() {
return quantity;
}
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!