package com.steerinfo.ems.tmcdocdirectory.model;

import com.steerinfo.ems.Utils.TreePO;
import com.steerinfo.framework.model.IBasePO;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

public class TMcDocdirectory implements IBasePO<String>, TreePO<String, String, TMcDocdirectory> {

    private static final long serialVersionUID = 1L;
    /**
     * 子目录名(ITEMCODE,VARCHAR,400)
     */
    @ApiModelProperty(value="子目录名",required=false)
    private String itemcode;

    /**
     * 描述(NOTE,VARCHAR,4000)
     */
    @ApiModelProperty(value="描述",required=true)
    private String note;

    /**
     * 父目录名(PARENTCODE,VARCHAR,400)
     */
    @ApiModelProperty(value="父目录名",required=true)
    private String parentcode;

    /**
     * 记录ID(RECORDID,DECIMAL,0)
     */
    @ApiModelProperty(value="记录ID",required=true)
    private Long recordid;

    /**
     * 路径(PATH,VARCHAR,800)
     */
    @ApiModelProperty(value="路径",required=true)
    private String path;

    private List<TMcDocdirectory> Children;

    @Override
    public String getCode(){return itemcode;}

    @Override
    public void setCode(String itemcode){this.itemcode = itemcode == null ? null : itemcode.trim();}

    @Override
    public String getParentId(){return parentcode;}

    @Override
    public void  setParentId(String parentid){this.parentcode = parentcode == null ? null : parentcode.trim();}

    @Override
    public List<TMcDocdirectory> getChildren(){return Children;}

    @Override
    public void setChildren(List<TMcDocdirectory> children){this.Children = children;}

    @Override
    public String getId() {
        return this.itemcode;
    }

    @Override
    public void setId(String itemcode) {
        this.itemcode = itemcode == null ? null : itemcode.trim();
    }

    public String getItemcode() {
        return itemcode;
    }

    public void setItemcode(String itemcode) {
        this.itemcode = itemcode == null ? null : itemcode.trim();
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note == null ? null : note.trim();
    }

    public String getParentcode() {
        return parentcode;
    }

    public void setParentcode(String parentcode) {
        this.parentcode = parentcode == null ? null : parentcode.trim();
    }

    public Long getRecordid() {
        return recordid;
    }

    public void setRecordid(Long recordid) {
        this.recordid = recordid;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path == null ? null : path.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", itemcode=").append(itemcode);
        sb.append(", note=").append(note);
        sb.append(", parentcode=").append(parentcode);
        sb.append(", recordid=").append(recordid);
        sb.append(", path=").append(path);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}