package com.fzm.mall.server.admin.home_page.entity.dto;

import com.fzm.mall.server.admin.annotation.CustomType;
import com.fzm.mall.server.admin.constant.MALLGlobalConfig;
import com.fzm.mall.server.admin.constant.MallResponseError;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author wangp
 * @date 2021/3/5 10:26
 * @description 修改密码
 * @since JDK 1.8
 */
@Data
@ApiModel(value = "RepairPwdDTO对象", description = "修改密码")
public class RepairPwdDTO {

    @ApiModelProperty(value = "修改密码方式(1.原密码 2.手机号 3.重置)")
    @CustomType(pType = MALLGlobalConfig.REPAIR_PWD, message = MallResponseError.PARAM_ERROR)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer type;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "原密码")
    private String pwd;

    @ApiModelProperty(value = "验证码")
    private String code;

    @ApiModelProperty(value = "验证token")
    private String token;

    @ApiModelProperty(value = "新密码")
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String newPwd;

    @ApiModelProperty(value = "确认新密码")
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String newPwd2;

}
