-
含义
-
怎么来
-
是否能为null
-
package cn.jiedada.aisell.domain; import com.fasterxml.jackson.annotation.JsonFormat; import org.springframework.format.annotation.DateTimeFormat; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import java.math.BigDecimal; import java.util.Date; @Entity @Table(name = "purchasebill") public class PurchaseBill extends BasicDomain{ /*通过这个注解可以把前台的秒钟可以换成大家都能看懂的页面 1429545600000时间转化为我们能做的页面*/ @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date vdate;//交易时间(是我们自己录入的) private BigDecimal totalAmount;//总金额 private BigDecimal totalNum;//总数量 private Date inputTime=new Date();//录入时间 private Date auditorTime;//审核时间 private Integer status=0;//默认状态 @ManyToOne @JoinColumn(name = "supplier_id") private Supplier supplier;//供应商 @ManyToOne @JoinColumn(name = "auditor_id") private Employee auditor;//审核人 @ManyToOne @JoinColumn(name = "inputUser_id") private Employee inputUser;//登陆用户录入 @ManyToOne @JoinColumn(name = "buyer_id") private Employee buyer;//采购员 public Date getVdate() { return vdate; } @DateTimeFormat(pattern = "yyyy-MM-dd") public void setVdate(Date vdate) { this.vdate = vdate; } public BigDecimal getTotalAmount() { return totalAmount; } public void setTotalAmount(BigDecimal totalAmount) { this.totalAmount = totalAmount; } public BigDecimal getTotalNum() { return totalNum; } public void setTotalNum(BigDecimal totalNum) { this.totalNum = totalNum; } public Date getInputTime() { return inputTime; } public void setInputTime(Date inputTime) { this.inputTime = inputTime; } public Date getAuditorTime() { return auditorTime; } public void setAuditorTime(Date auditorTime) { this.auditorTime = auditorTime; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } public Supplier getSupplier() { return supplier; } public void setSupplier(Supplier supplier) { this.supplier = supplier; } public Employee getAuditor() { return auditor; } public void setAuditor(Employee auditor) { this.auditor = auditor; } public Employee getInputUser() { return inputUser; } public void setInputUser(Employee inputUser) { this.inputUser = inputUser; } public Employee getBuyer() { return buyer; } public void setBuyer(Employee buyer) { this.buyer = buyer; } @Override public String toString() { return "PurchaseBill{" + "vdate=" + vdate + ", totalAmount=" + totalAmount + ", totalNum=" + totalNum + ", inputTime=" + inputTime + ", auditorTime=" + auditorTime + ", status=" + status + ", supplier=" + supplier + ", auditor=" + auditor + ", inputUser=" + inputUser + ", buyer=" + buyer + ", id=" + id + '}'; } }