package com.hs.admin.model.reqmodel;

import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

public class OrgReq {
    public static class GetOrgReq {
        @ApiModelProperty(value = "机构名称", required = true)
        private String orgName;

        public String getOrgName() {
            return orgName;
        }

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

        @Override
        public String toString() {
            return "GetOrgReq{" +
                    "orgName='" + orgName + '\'' +
                    '}';
        }
    }

    public static class InfoOrgReq {
        @ApiModelProperty(value = "机构ID", required = true)
        @NotNull(message = "机构ID 参数必传")
        private Integer orgId;

        public Integer getOrgId() {
            return orgId;
        }

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

        @Override
        public String toString() {
            return "InfoOrgReq{" +
                    "orgId=" + orgId +
                    '}';
        }
    }

    public static class AddOrgReq {
        @ApiModelProperty(value = "组织机构代码", required = true)
        @NotBlank(message = "组织机构代码 参数必传")
        private String orgCode;

        @ApiModelProperty(value = "机构名称", required = true)
        @NotBlank(message = "机构名称 参数必传")
        private String orgName;

        @ApiModelProperty(value = "登记号", required = true)
        private String orgNo;

        @ApiModelProperty(value = "机构简称", required = true)
        @NotBlank(message = "机构简称 参数必传")
        private String orgShortName;

        @ApiModelProperty(value = "机构分类", required = true)
        private String orgGroup;

        @ApiModelProperty(value = "机构类型", required = true)
        private String orgType;

        @ApiModelProperty(value = "地址", required = true)
        private String orgAddress;

        @ApiModelProperty(value = "父级关系", required = true)
        @NotNull(message = "父级关系 参数必传")
        private Integer parentId;

        @ApiModelProperty(value = "是否为新机构", required = true)
        @NotNull(message = "是否为新机构 参数必传")
        private Integer isNew;



        public String getOrgCode() {
            return orgCode;
        }

        public void setOrgCode(String orgCode) {
            this.orgCode = orgCode;
        }

        public String getOrgName() {
            return orgName;
        }

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

        public String getOrgNo() {
            return orgNo;
        }

        public void setOrgNo(String orgNo) {
            this.orgNo = orgNo;
        }

        public String getOrgShortName() {
            return orgShortName;
        }

        public void setOrgShortName(String orgShortName) {
            this.orgShortName = orgShortName;
        }

        public String getOrgGroup() {
            return orgGroup;
        }

        public void setOrgGroup(String orgGroup) {
            this.orgGroup = orgGroup;
        }

        public String getOrgType() {
            return orgType;
        }

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

        public String getOrgAddress() {
            return orgAddress;
        }

        public void setOrgAddress(String orgAddress) {
            this.orgAddress = orgAddress;
        }

        public Integer getParentId() {
            return parentId;
        }

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

        public Integer getIsNew() {
            return isNew;
        }

        public void setIsNew(Integer isNew) {
            this.isNew = isNew;
        }

        @Override
        public String toString() {
            return "AddOrgReq{" +
                    "orgCode='" + orgCode + '\'' +
                    ", orgName='" + orgName + '\'' +
                    ", orgNo='" + orgNo + '\'' +
                    ", orgShortName='" + orgShortName + '\'' +
                    ", orgGroup='" + orgGroup + '\'' +
                    ", orgType='" + orgType + '\'' +
                    ", orgAddress='" + orgAddress + '\'' +
                    ", parentId=" + parentId +
                    ", isNew=" + isNew +
                    '}';
        }
    }

    public static class DeleteOrgReq {
        @ApiModelProperty(value = "机构ID", required = true)
        @NotNull(message = "机构ID 参数必传")
        private Integer orgId;

        public Integer getOrgId() {
            return orgId;
        }

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

        @Override
        public String toString() {
            return "InfoOrgReq{" +
                    "orgId=" + orgId +
                    '}';
        }
    }

    public static class UpdateOrgReq {
        @ApiModelProperty(value = "机构ID", required = true)
        @NotNull(message = "机构ID 参数必传")
        private Integer orgId;

        @ApiModelProperty(value = "组织机构代码", required = true)
        @NotBlank(message = "组织机构代码 参数必传")
        private String orgCode;

        @ApiModelProperty(value = "机构名称", required = true)
        @NotBlank(message = "机构名称 参数必传")
        private String orgName;

        @ApiModelProperty(value = "登记号", required = true)
        private String orgNo;

        @ApiModelProperty(value = "机构简称", required = true)
        @NotBlank(message = "机构简称 参数必传")
        private String orgShortName;

        @ApiModelProperty(value = "机构分类", required = true)
        private String orgGroup;

        @ApiModelProperty(value = "机构类型", required = true)
        private String orgType;

        @ApiModelProperty(value = "地址", required = true)
        private String orgAddress;

        @ApiModelProperty(value = "父级关系", required = true)
        @NotNull(message = "父级关系 参数必传")
        private Integer parentId;

        @ApiModelProperty(value = "是否为新机构", required = true)
        @NotNull(message = "是否为新机构 参数必传")
        private Integer isNew;

        public Integer getOrgId() {
            return orgId;
        }

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

        public String getOrgCode() {
            return orgCode;
        }

        public void setOrgCode(String orgCode) {
            this.orgCode = orgCode;
        }

        public String getOrgName() {
            return orgName;
        }

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

        public String getOrgNo() {
            return orgNo;
        }

        public void setOrgNo(String orgNo) {
            this.orgNo = orgNo;
        }

        public String getOrgShortName() {
            return orgShortName;
        }

        public void setOrgShortName(String orgShortName) {
            this.orgShortName = orgShortName;
        }

        public String getOrgGroup() {
            return orgGroup;
        }

        public void setOrgGroup(String orgGroup) {
            this.orgGroup = orgGroup;
        }

        public String getOrgType() {
            return orgType;
        }

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

        public String getOrgAddress() {
            return orgAddress;
        }

        public void setOrgAddress(String orgAddress) {
            this.orgAddress = orgAddress;
        }

        public Integer getParentId() {
            return parentId;
        }

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

        public Integer getIsNew() {
            return isNew;
        }

        public void setIsNew(Integer isNew) {
            this.isNew = isNew;
        }

        @Override
        public String toString() {
            return "UpdateOrgReq{" +
                    "orgId=" + orgId +
                    ", orgCode='" + orgCode + '\'' +
                    ", orgName='" + orgName + '\'' +
                    ", orgNo='" + orgNo + '\'' +
                    ", orgShortName='" + orgShortName + '\'' +
                    ", orgGroup='" + orgGroup + '\'' +
                    ", orgType='" + orgType + '\'' +
                    ", orgAddress='" + orgAddress + '\'' +
                    ", parentId=" + parentId +
                    ", isNew=" + isNew +
                    '}';
        }
    }

    /**
     * 查询用户机构入参
     */
    public static class GetUserOrgReq {
        @ApiModelProperty(value = "用户ID", required = true)
        @NotNull(message = "用户ID 参数必传")
        private Integer userId;

        public Integer getUserId() {
            return userId;
        }

        public void setUserId(Integer userId) {
            this.userId = userId;
        }

        @Override
        public String toString() {
            return "GetUserOrgReq{" +
                    "userId=" + userId +
                    '}';
        }
    }

    /**
     * 配置用户机构入参
     */
    public static class SaveUserOrgReq {
        @ApiModelProperty(value = "用户ID", required = true)
        @NotNull(message = "用户ID 参数必传")
        private Long userId;

        @ApiModelProperty(value = "机构ID", required = true)
        @NotNull(message = "机构ID 参数必传")
        private List<Long> org;

        public Long getUserId() {
            return userId;
        }

        public void setUserId(Long userId) {
            this.userId = userId;
        }

        public List<Long> getOrg() {
            return org;
        }

        public void setOrg(List<Long> org) {
            this.org = org;
        }

        @Override
        public String toString() {
            return "SaveUserOrgReq{" +
                    "userId=" + userId +
                    ", org=" + org +
                    '}';
        }
    }

}
