package com.boying.entity; import com.boying.common.BaseEntity; import com.fasterxml.jackson.annotation.JsonFormat; import org.springframework.format.annotation.DateTimeFormat; import javax.persistence.Entity; import javax.persistence.Table; import javax.persistence.Transient; import java.util.Date; @Table(name = "whiteList") @Entity public class WhiteList extends BaseEntity { private String carNo;//车牌号 private Long parkId;//停车场id private int type;//0:永久 1:月票 @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date startTime;//月票开始日期 @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") private Date endTime;//月票结束日期 @Transient private String name; public WhiteList() { } public WhiteList(WhiteList whiteList, String name) { this.name = name; this.carNo = whiteList.carNo; this.parkId = whiteList.parkId; this.type = whiteList.type; this.startTime = whiteList.startTime; this.endTime = whiteList.endTime; this.id = whiteList.id; } public String getCarNo() { return carNo; } public void setCarNo(String carNo) { this.carNo = carNo; } public Date getStartTime() { return startTime; } public void setStartTime(Date startTime) { this.startTime = startTime; } public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } public Long getParkId() { return parkId; } public void setParkId(Long parkId) { this.parkId = parkId; } public int getType() { return type; } public void setType(int type) { this.type = type; } public String getName() { return name; } public void setName(String name) { this.name = name; } }