package com.qianwen.mdc.domain.workshop;
|
|
import java.io.Serializable;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
/**
|
* 车间
|
*/
|
@TableName("workshop")
|
public class Workshop implements Serializable {
|
/**
|
* primary key
|
*/
|
@TableId(type=IdType.ASSIGN_ID)
|
private Long id;
|
|
/**
|
* workshop name
|
*/
|
private String name;
|
|
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;
|
}
|
|
/**
|
* 获取workshop name
|
*
|
* @return name - workshop name
|
*/
|
public String getName() {
|
return name;
|
}
|
|
/**
|
* 设置workshop name
|
*
|
* @param name workshop name
|
*/
|
public void setName(String name) {
|
this.name = name;
|
}
|
|
@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("]");
|
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;
|
}
|
Workshop other = (Workshop) that;
|
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()));
|
}
|
|
@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());
|
return result;
|
}
|
}
|