industrial_measurement/src/main/java/com/xkrs/model/entity/QcInspectionItemDict.java

79 lines
2.0 KiB
Java
Raw Normal View History

2022-02-28 13:55:17 +08:00
package com.xkrs.model.entity;
import javax.persistence.*;
/**
* @Author: XinYi Song
* @Date: 2022/1/19 9:26
* <p>
* 1实体类和表的映射关系
* @Entity声明实体类
* @Table配置实体类和表的映射关系 name配置数据库表的名称
* 2实体类中属性和表中字段的映射关系
* @Id声明主键的配置
* @GeneratedValue配置主键的生成策略 GenerationType.SEQUENCE序列
* @Column配置属性和字段的映射关系 name数据库表中的字段名称
*/
@Entity
@Table(name = "qc_inspection_item_dict")
public class QcInspectionItemDict {
/**
* 索引
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 检验项代码
*/
@Column(length = 85, columnDefinition = "varchar(85)")
private String inspectionItemCode;
/**
* 检验项名称
*/
@Column(length = 85, columnDefinition = "varchar(85)")
private String inspectionItemName;
public QcInspectionItemDict() {
}
public QcInspectionItemDict(Integer id, String inspectionItemCode, String inspectionItemName) {
this.id = id;
this.inspectionItemCode = inspectionItemCode;
this.inspectionItemName = inspectionItemName;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getInspectionItemCode() {
return inspectionItemCode;
}
public void setInspectionItemCode(String inspectionItemCode) {
this.inspectionItemCode = inspectionItemCode;
}
public String getInspectionItemName() {
return inspectionItemName;
}
public void setInspectionItemName(String inspectionItemName) {
this.inspectionItemName = inspectionItemName;
}
@Override
public String toString() {
return "DataDict{" + "id=" + id + ", inspectionItemCode='" + inspectionItemCode + '\'' + ", inspectionItemName='" + inspectionItemName + '\'' + '}';
}
}