package com.ruoyi.system.domain;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.xss.Xss;

/**
 * 组织机构对象 risk_org
 */
public class RiskOrg extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 机构ID */
    @Excel(name = "机构ID", cellType = ColumnType.NUMERIC)
    private Long orgId;

    /** 机构名称 */
    @Excel(name = "机构名称")
    private String orgName;

    /** 机构类别 */
    @Excel(name = "机构类别", readConverterExp = "1=总部机构,2=资管中心,3=职能中心,4=分支机构")
    private String orgType;

    /** 负责人 */
    @Excel(name = "负责人")
    private String leader;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String phone;

    /** 邮箱 */
    @Excel(name = "电子邮箱")
    private String email;

    /** 状态 */
    @Excel(name = "机构状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 联系地址 */
    @Excel(name = "联系地址")
    private String address;

    /** 排序 */
    @Excel(name = "显示顺序", cellType = ColumnType.NUMERIC)
    private Integer sortNum;

    public Long getOrgId()
    {
        return orgId;
    }

    public void setOrgId(Long orgId)
    {
        this.orgId = orgId;
    }

    @Xss(message = "机构名称不能包含脚本字符")
    @NotBlank(message = "机构名称不能为空")
    @Size(min = 0, max = 64, message = "机构名称长度不能超过64个字符")
    public String getOrgName()
    {
        return orgName;
    }

    public void setOrgName(String orgName)
    {
        this.orgName = orgName;
    }

    @NotBlank(message = "机构类别不能为空")
    public String getOrgType()
    {
        return orgType;
    }

    public void setOrgType(String orgType)
    {
        this.orgType = orgType;
    }

    @Xss(message = "负责人不能包含脚本字符")
    @Size(min = 0, max = 32, message = "负责人长度不能超过32个字符")
    public String getLeader()
    {
        return leader;
    }

    public void setLeader(String leader)
    {
        this.leader = leader;
    }

    @Size(min = 0, max = 20, message = "联系电话长度不能超过20个字符")
    public String getPhone()
    {
        return phone;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    @Size(min = 0, max = 64, message = "电子邮箱长度不能超过64个字符")
    public String getEmail()
    {
        return email;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getStatus()
    {
        return status;
    }

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

    @Xss(message = "联系地址不能包含脚本字符")
    @Size(min = 0, max = 255, message = "联系地址长度不能超过255个字符")
    public String getAddress()
    {
        return address;
    }

    public void setAddress(String address)
    {
        this.address = address;
    }

    public Integer getSortNum()
    {
        return sortNum;
    }

    public void setSortNum(Integer sortNum)
    {
        this.sortNum = sortNum;
    }

    @Override
    public String toString()
    {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("orgId", getOrgId())
            .append("orgName", getOrgName())
            .append("orgType", getOrgType())
            .append("leader", getLeader())
            .append("phone", getPhone())
            .append("email", getEmail())
            .append("status", getStatus())
            .append("address", getAddress())
            .append("sortNum", getSortNum())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
