package com.yida.data.system.dto;

import com.yida.data.common.core.annotation.IsMobile;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 保存代理商请求类
 *
 * @author ZYJ
 * @date 2021/9/26
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "AgentSaveDTO", description = "保存代理商请求类")
public class AgentSaveDTO implements Serializable {

    private static final long serialVersionUID = -8124622227922125877L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    private Long id;

    /**
     * 代理商名称
     */
    @NotBlank
    @Size(max = 100)
    @ApiModelProperty(value = "代理商名称", required = true)
    private String agentName;

    /**
     * 负责人名称
     */
    @NotBlank
    @Size(max = 100)
    @ApiModelProperty(value = "负责人名称", required = true)
    private String principalName;

    /**
     * 负责人电话
     */
    @NotBlank
    @IsMobile(message = "手机号不合法")
    @ApiModelProperty(value = "负责人电话", required = true)
    private String principalPhone;

    /**
     * 地址
     */
    @Size(max = 255)
    @ApiModelProperty(value = "地址")
    private String address;

    /**
     * 区域id
     */
    @ApiModelProperty(value = "区域id", hidden = true)
    private Long areaId;
}