Rev 34405 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity.catalog;import com.spice.profitmandi.common.model.ProfitMandiConstants;import javax.persistence.*;import java.math.BigDecimal;import java.time.LocalDate;import java.time.LocalDateTime;@Entity@Table(name = "fofo.liquidation_products")public class Liquidation {@Id@GeneratedValue(strategy = GenerationType.IDENTITY)@Column(name = "id")private int id;@Column(name = "restricted")private Boolean restricted;@Column(name = "catalog_id")private Integer catalogId;@Column(name = "start_date")private LocalDateTime startDate;@Column(name = "end_date")private LocalDateTime endDate;@Column(name = "price", precision = 10, scale = 2)private float price;@Column(name = "quantity")private int quantity;@Enumerated(EnumType.STRING)private ProfitMandiConstants.LIQUIDATION_ENUM status = ProfitMandiConstants.LIQUIDATION_ENUM.INACTIVE;@Column(name = "created_by")private Integer createdBy;@Column(name = "created_at", updatable = false)private LocalDateTime createdAt;@Column(name = "updated_at")private LocalDateTime updatedAt;@PrePersistprotected void onCreate() {this.createdAt = LocalDateTime.now();this.updatedAt = LocalDateTime.now();}@PreUpdateprotected void onUpdate() {this.updatedAt = LocalDateTime.now();}public int getId() {return id;}public void setId(int id) {this.id = id;}public Boolean getRestricted() {return restricted;}public void setRestricted(Boolean restricted) {this.restricted = restricted;}public Integer getCatalogId() {return catalogId;}public void setCatalogId(Integer catalogId) {this.catalogId = catalogId;}public LocalDateTime getStartDate() {return startDate;}public void setStartDate(LocalDateTime startDate) {this.startDate = startDate;}public LocalDateTime getEndDate() {return endDate;}public void setEndDate(LocalDateTime endDate) {this.endDate = endDate;}public float getPrice() {return price;}public void setPrice(float price) {this.price = price;}public int getQuantity() {return quantity;}public void setQuantity(int quantity) {this.quantity = quantity;}public ProfitMandiConstants.LIQUIDATION_ENUM getStatus() {return status;}public void setStatus(ProfitMandiConstants.LIQUIDATION_ENUM status) {this.status = status;}public Integer getCreatedBy() {return createdBy;}public void setCreatedBy(Integer createdBy) {this.createdBy = createdBy;}public LocalDateTime getCreatedAt() {return createdAt;}public void setCreatedAt(LocalDateTime createdAt) {this.createdAt = createdAt;}public LocalDateTime getUpdatedAt() {return updatedAt;}public void setUpdatedAt(LocalDateTime updatedAt) {this.updatedAt = updatedAt;}@Overridepublic String toString() {return "Liquidation{" +"id=" + id +", restricted=" + restricted +", catalogId=" + catalogId +", startDate=" + startDate +", endDate=" + endDate +", price=" + price +", status=" + status +", createdBy=" + createdBy +", createdAt=" + createdAt +", updatedAt=" + updatedAt +'}';}}