package com.ruoyi.interfaces.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.SysMenu;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.TreeEntity;

/**
 * 数据项分类管理对象 md_data_cate
 *
 * @author 朱得糠
 * @date 2025-07-25
 */
public class MdDataCate extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 序号
     */
    private String cateId;

    /**
     * 父节点序号
     */
    @Excel(name = "父节点序号")
    private String catePid;

    /**
     * 名称
     */
    @Excel(name = "名称")
    private String itemName;

    /**
     * 排序
     */
    @Excel(name = "排序")
    private Long itemNo;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String itemNotes;

    /**
     * 编辑时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "编辑时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date modifyby;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createby;

    /**
     * 图标
     */
    private String icon;
    /**
     * 子菜单
     */
    private List<MdDataCate> children = new ArrayList<MdDataCate>();

    public MdDataCate(String dsCode, String cateId, String dsName, String icon) {
        this.cateId = dsCode;
        this.catePid = cateId;
        this.itemName = dsName;
        this.icon = icon;

    }


    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public List<MdDataCate> getChildren() {
        return children;
    }

    public void setChildren(List<MdDataCate> children) {
        this.children = children;
    }


    public Date getCreateby() {
        return createby;
    }

    public void setCreateby(Date createby) {
        this.createby = createby;
    }

    public void setCateId(String cateId) {
        this.cateId = cateId;
    }

    public String getCateId() {
        return cateId;
    }

    public void setCatePid(String catePid) {
        this.catePid = catePid;
    }

    public String getCatePid() {
        return catePid;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemNo(Long itemNo) {
        this.itemNo = itemNo;
    }

    public Long getItemNo() {
        return itemNo;
    }

    public void setItemNotes(String itemNotes) {
        this.itemNotes = itemNotes;
    }

    public String getItemNotes() {
        return itemNotes;
    }

    public void setModifyby(Date modifyby) {
        this.modifyby = modifyby;
    }

    public Date getModifyby() {
        return modifyby;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("cateId", getCateId())
                .append("catePid", getCatePid())
                .append("itemName", getItemName())
                .append("itemNo", getItemNo())
                .append("itemNotes", getItemNotes())
                .append("createby", getCreateby())
                .append("modifyby", getModifyby())
                .toString();
    }

    public MdDataCate(String cateId, String catePid, String itemName, Long itemNo, String itemNotes, Date modifyby, Date createby, String icon, List<MdDataCate> children) {
        this.cateId = cateId;
        this.catePid = catePid;
        this.itemName = itemName;
        this.itemNo = itemNo;
        this.itemNotes = itemNotes;
        this.modifyby = modifyby;
        this.createby = createby;
        this.icon = icon;
        this.children = children;
    }

    public MdDataCate() {
    }
}
