package com.northglass.entity;
|
|
import java.util.Date;
|
|
import javax.persistence.Entity;
|
import javax.persistence.JoinColumn;
|
import javax.persistence.ManyToOne;
|
import javax.persistence.Table;
|
import javax.persistence.Transient;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
@Entity
|
@Table(name="gmms_rank")
|
public class Rank extends IdEntity {
|
|
private String glassId;
|
private int pieces;
|
private double width;
|
private double height;
|
private double thickness;
|
private String color;
|
private String type;
|
private String flag;
|
//厂家信息
|
private String manufacturer;
|
private Date createtime;
|
private Date endtime;
|
private ShelfRank shelfRank;
|
|
public Rank() { }
|
|
@ManyToOne
|
@JoinColumn(name="shelf_rank_id")
|
public ShelfRank getShelfRank() {
|
return shelfRank;
|
}
|
|
public void setShelfRank(ShelfRank shelfRank) {
|
this.shelfRank = shelfRank;
|
}
|
|
public String getManufacturer() {
|
return manufacturer;
|
}
|
|
public void setManufacturer(String manufacturer) {
|
this.manufacturer = manufacturer;
|
}
|
|
public double getWidth() {
|
return width;
|
}
|
|
public void setWidth(double width) {
|
this.width = width;
|
}
|
|
public double getHeight() {
|
return height;
|
}
|
|
public void setHeight(double height) {
|
this.height = height;
|
}
|
|
public double getThickness() {
|
return thickness;
|
}
|
|
public void setThickness(double thickness) {
|
this.thickness = thickness;
|
}
|
|
public String getColor() {
|
return color;
|
}
|
|
public void setColor(String color) {
|
this.color = color;
|
}
|
|
public int getPieces() {
|
return pieces;
|
}
|
|
public void setPieces(int pieces) {
|
this.pieces = pieces;
|
}
|
|
public Date getCreatetime() {
|
return createtime;
|
}
|
|
public void setCreatetime(Date createtime) {
|
this.createtime = createtime;
|
}
|
|
public String getGlassId() {
|
return glassId;
|
}
|
|
public void setGlassId(String glassId) {
|
this.glassId = glassId;
|
}
|
|
public String getType() {
|
return type;
|
}
|
|
public void setType(String type) {
|
this.type = type;
|
}
|
|
public Date getEndtime() {
|
return endtime;
|
}
|
|
public void setEndtime(Date endTime) {
|
this.endtime = endTime;
|
}
|
|
public String getFlag() {
|
return flag;
|
}
|
|
public void setFlag(String flag) {
|
this.flag = flag;
|
}
|
|
public Rank(double width, double height, double thickness, String color) {
|
super();
|
this.width = width;
|
this.height = height;
|
this.thickness = thickness;
|
this.color = color;
|
}
|
|
|
|
|
public Rank(String glassId, int pieces, double width, double height, double thickness,
|
String color, String manufacturer, Date createtime,ShelfRank shelfRank) {
|
super();
|
this.glassId = glassId;
|
this.pieces = pieces;
|
this.width = width;
|
this.height = height;
|
this.thickness = thickness;
|
this.color = color;
|
this.manufacturer = manufacturer;
|
this.createtime = createtime;
|
this.shelfRank = shelfRank;
|
}
|
|
public Rank(String glassId, int pieces, String state, double width, double height, double thickness,
|
String color, int leftPieces, String manufacturer, String comment, Date createtime) {
|
super();
|
this.glassId = glassId;
|
this.pieces = pieces;
|
this.width = width;
|
this.height = height;
|
this.thickness = thickness;
|
this.color = color;
|
this.manufacturer = manufacturer;
|
this.createtime = createtime;
|
}
|
|
public Rank(String glassId, int pieces, double width, double height, double thickness, String color) {
|
super();
|
this.glassId = glassId;
|
this.pieces = pieces;
|
this.width = width;
|
this.height = height;
|
this.thickness = thickness;
|
this.color = color;
|
}
|
|
@Transient
|
@JsonIgnore
|
public String getDescription() {
|
return this.thickness + "mm "
|
+ this.width + "*" + this.height + "mm "
|
+ this.color + " " + this.pieces + "/" + this.pieces;
|
}
|
}
|