package com.example.demo.model;

import java.time.LocalDateTime;

/**
 * 数据字典实体模型。
 * 用于维护系统中各类数据字典项。
 */
public class Dictionary {

    /** 字典ID */
    private Long id;

    /** 字典类型编码 */
    private String dictType;

    /** 字典类型名称 */
    private String dictTypeName;

    /** 字典项键 */
    private String itemKey;

    /** 字典项值 */
    private String itemValue;

    /** 排序序号 */
    private Integer sortOrder;

    /** 状态：0-禁用，1-启用 */
    private Integer status;

    /** 创建时间 */
    private LocalDateTime createTime;

    /** 修改时间 */
    private LocalDateTime updateTime;

    public Dictionary() {
    }

    public Dictionary(Long id, String dictType, String dictTypeName, String itemKey,
                      String itemValue, Integer sortOrder, Integer status) {
        this.id = id;
        this.dictType = dictType;
        this.dictTypeName = dictTypeName;
        this.itemKey = itemKey;
        this.itemValue = itemValue;
        this.sortOrder = sortOrder;
        this.status = status;
        this.createTime = LocalDateTime.now();
        this.updateTime = LocalDateTime.now();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDictType() {
        return dictType;
    }

    public void setDictType(String dictType) {
        this.dictType = dictType;
    }

    public String getDictTypeName() {
        return dictTypeName;
    }

    public void setDictTypeName(String dictTypeName) {
        this.dictTypeName = dictTypeName;
    }

    public String getItemKey() {
        return itemKey;
    }

    public void setItemKey(String itemKey) {
        this.itemKey = itemKey;
    }

    public String getItemValue() {
        return itemValue;
    }

    public void setItemValue(String itemValue) {
        this.itemValue = itemValue;
    }

    public Integer getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(Integer sortOrder) {
        this.sortOrder = sortOrder;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
}
