package com.qianwen.mdc.domain; import java.io.Serializable; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; /** * 工段 */ @TableName("section") public class Section implements Serializable { /** * primary key */ @TableId(type=IdType.ASSIGN_ID) private Long id; /** * section name */ private String name; /** * workshop id */ //@Column(name = "workshop_id") private Long workshopId; private static final long serialVersionUID = 1L; /** * 获取primary key * * @return id - primary key */ public Long getId() { return id; } /** * 设置primary key * * @param id primary key */ public void setId(Long id) { this.id = id; } /** * 获取section name * * @return name - section name */ public String getName() { return name; } /** * 设置section name * * @param name section name */ public void setName(String name) { this.name = name; } /** * 获取workshop id * * @return workshop_id - workshop id */ public Long getWorkshopId() { return workshopId; } /** * 设置workshop id * * @param workshopId workshop id */ public void setWorkshopId(Long workshopId) { this.workshopId = workshopId; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", name=").append(name); sb.append(", workshopId=").append(workshopId); sb.append("]"); return sb.toString(); } @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } Section other = (Section) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) && (this.getWorkshopId() == null ? other.getWorkshopId() == null : this.getWorkshopId().equals(other.getWorkshopId())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); result = prime * result + ((getWorkshopId() == null) ? 0 : getWorkshopId().hashCode()); return result; } }