You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
test/src/main/java/com/entity/model/DictionaryModel.java

206 lines
5.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.entity.model;
// 引入字典表实体类,可能用于与数据库实体交互或类型转换等操作
import com.entity.DictionaryEntity;
// 该注解用于指定实体类对应的数据库表名,不过在当前代码中未实际使用该功能
import com.baomidou.mybatisplus.annotations.TableName;
// 用于在将对象序列化为JSON时对日期类型的字段进行格式化处理
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
// 用于在Spring MVC中将前端传递的日期字符串绑定到Java对象的日期字段时进行格式化
import org.springframework.format.annotation.DateTimeFormat;
// 实现该接口意味着这个类的对象可以被序列化和反序列化,方便在网络传输或存储时使用
import java.io.Serializable;
/**
* 字典表
* 接收传参的实体类
*(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了
* 取自ModelAndView 的model名称
*/
// 定义一个名为DictionaryModel的类实现Serializable接口用于接收字典表相关的参数
public class DictionaryModel implements Serializable {
// 序列化版本号,用于在反序列化时验证版本一致性,避免不同版本类之间反序列化出错
private static final long serialVersionUID = 1L;
/**
* 主键
*/
// 用于唯一标识字典表中的每一条记录,在数据库操作中常作为主键使用
private Integer id;
/**
* 字段
*/
// 表示字典表中的某个字段,可能用于存储特定的数据标识
private String dicCode;
/**
* 字段名
*/
// 该字段的名称用于更直观地描述dicCode所代表的含义
private String dicName;
/**
* 编码
*/
// 可能是对该字段的一种编码表示,方便数据的分类和查询
private Integer codeIndex;
/**
* 编码名字
*/
// 编码对应的名称,用于更清晰地展示编码的具体含义
private String indexName;
/**
* 父字段id
*/
// 用于关联父字段,可能用于构建字典表的层级结构
private Integer superId;
/**
* 备注
*/
// 对该条字典记录的额外说明信息,可用于记录一些特殊情况或备注
private String beizhu;
/**
* 创建时间
*/
// 对日期进行JSON序列化时指定日期的格式、语言环境和时区
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
// 用于在Spring MVC中将前端传递的日期字符串转换为Date类型时指定格式
@DateTimeFormat
// 记录该条字典记录的创建时间
private Date createTime;
/**
* 获取:主键
*/
// 定义一个公共的获取主键的方法供外部调用获取id的值
public Integer getId() {
return id;
}
/**
* 设置:主键
*/
// 定义一个公共的设置主键的方法供外部调用设置id的值
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:字段
*/
// 定义一个公共的获取字段标识的方法供外部调用获取dicCode的值
public String getDicCode() {
return dicCode;
}
/**
* 设置:字段
*/
// 定义一个公共的设置字段标识的方法供外部调用设置dicCode的值
public void setDicCode(String dicCode) {
this.dicCode = dicCode;
}
/**
* 获取:字段名
*/
// 定义一个公共的获取字段名称的方法供外部调用获取dicName的值
public String getDicName() {
return dicName;
}
/**
* 设置:字段名
*/
// 定义一个公共的设置字段名称的方法供外部调用设置dicName的值
public void setDicName(String dicName) {
this.dicName = dicName;
}
/**
* 获取:编码
*/
// 定义一个公共的获取编码的方法供外部调用获取codeIndex的值
public Integer getCodeIndex() {
return codeIndex;
}
/**
* 设置:编码
*/
// 定义一个公共的设置编码的方法供外部调用设置codeIndex的值
public void setCodeIndex(Integer codeIndex) {
this.codeIndex = codeIndex;
}
/**
* 获取:编码名字
*/
// 定义一个公共的获取编码名称的方法供外部调用获取indexName的值
public String getIndexName() {
return indexName;
}
/**
* 设置:编码名字
*/
// 定义一个公共的设置编码名称的方法供外部调用设置indexName的值
public void setIndexName(String indexName) {
this.indexName = indexName;
}
/**
* 获取父字段id
*/
// 定义一个公共的获取父字段ID的方法供外部调用获取superId的值
public Integer getSuperId() {
return superId;
}
/**
* 设置父字段id
*/
// 定义一个公共的设置父字段ID的方法供外部调用设置superId的值
public void setSuperId(Integer superId) {
this.superId = superId;
}
/**
* 获取:备注
*/
// 定义一个公共的获取备注信息的方法供外部调用获取beizhu的值
public String getBeizhu() {
return beizhu;
}
/**
* 设置:备注
*/
// 定义一个公共的设置备注信息的方法供外部调用设置beizhu的值
public void setBeizhu(String beizhu) {
this.beizhu = beizhu;
}
/**
* 获取:创建时间
*/
// 定义一个公共的获取创建时间的方法供外部调用获取createTime的值
public Date getCreateTime() {
return createTime;
}
/**
* 设置:创建时间
*/
// 定义一个公共的设置创建时间的方法供外部调用设置createTime的值
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}