package com.qmth.sop.business.bean.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.sop.business.bean.result.SysUserResult;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @Date: 2021/3/29.
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrgDto implements Serializable {

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    private String code;
    private String name;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;
    private Boolean enable;

    @ApiModelProperty(value = "类型")
    private String type;

    private List<OrgDto> children = new ArrayList<>();

    @ApiModelProperty(value = "机构下系统用户")
    private List<SysUserResult> sysUserList;

    public Long getId() {
        return id;
    }

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

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

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

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

    public List<SysUserResult> getSysUserList() {
        return sysUserList;
    }

    public void setSysUserList(List<SysUserResult> sysUserList) {
        this.sysUserList = sysUserList;
    }
}
