package org.springblade.modules.api.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
public class AddChildAccountRequest {
    @NotBlank(message = "手机号不能为空")
    @ApiModelProperty(value = "手机号")
    private String phone;
    @ApiModelProperty(value = "昵称")
    private String nickname;
    @ApiModelProperty(value = "姓名")
    private String realName;
    @ApiModelProperty(value = "头像")
    private String cover;
    @ApiModelProperty(value = "密码")
    private String password;
    @ApiModelProperty(value = "确认密码")
    private String rePassword;
    @NotBlank(message = "授权门店不能为空")
    @ApiModelProperty(value = "授权门店id集合，以逗号分隔")
    private String authShopIds;

    public String getPassword() {
        return password == null ? "123456" : password;
    }

    public String getRePassword() {
        return rePassword == null ? "123456" : rePassword;
    }
}
