package com.sy.coinage.sys.req;

import com.sy.coinage.core.interceptor.Update;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

/**
 * 组织机构添加请求bean
 */
@Data
public class OrgReq implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 自增主键 -10
     */
    @NotNull(message = "自增主键不能为空", groups = {Update.class})
    @Range(min = 1, groups = {Update.class})
    private Integer id;
    /**
     * 排序 -5
     */
    @ApiModelProperty(value = "排序")
    private Integer sorted;
    /**
     * 上级id -10
     */
    @ApiModelProperty(value = "上级id")
    private Integer pid;
    /**
     * 负责人 -10
     */
    @ApiModelProperty(value = "负责人")
    @Length(max = 10, message = "负责人长度不正确")
    private String directorName;
    /**
     * 机构简称 -10
     */
    @ApiModelProperty(value = "机构简称")
    @Length(max = 10, message = "机构简称长度不正确")
    private String shortName;
    /**
     * 联系人 -10
     */
    @ApiModelProperty(value = "联系人")
    @Length(max = 10, message = "联系人长度不正确")
    private String linkman;
    /**
     * 联系电话 -20
     */
    @ApiModelProperty(value = "联系电话")
    @Length(max = 20, message = "联系电话长度不正确")
    private String telephone;
    /**
     * 省编号 -10
     */
    @ApiModelProperty(value = "省编号")
    private Integer provinceCode;
    /**
     * 市编号 -10
     */
    @ApiModelProperty(value = "市编号")
    private Integer cityCode;
    /**
     * 区编号 -10
     */
    @ApiModelProperty(value = "区编号")
    private Integer districtCode;
    /**
     * 省名称 -20
     */
    @ApiModelProperty(value = "省名称")
    private String provinceName;
    /**
     * 市名称 -20
     */
    @ApiModelProperty(value = "市名称")
    private String cityName;
    /**
     * 区名称 -20
     */
    @ApiModelProperty(value = "区名称")
    private String districtName;
    /**
     * 组织机构代码/编号 -20
     */
    @ApiModelProperty(value = "组织机构代码")
    private String code;
    /**
     * 机构名称 -50
     */
    @ApiModelProperty(value = "机构名称")
    @NotBlank(message = "机构名称不能为空")
    @Length(max = 50, message = "机构名称长度不正确")
    private String name;
    /**
     * 详细地址/无省市区信息 -50
     */
    @ApiModelProperty(value = "详细地址")
    private String address;

}
