package com.xkrs.model.entity; import javax.persistence.*; /** * @Author: XinYi Song * @Date: 2022/1/19 9:26 *

* 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 + '\'' + '}'; } }