package com.greenorange.promotion.model.dto.user;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 用户添加请求体
 */
@Data
@Schema(description = "用户表添加请求体", requiredProperties = {"nickName", "userAvatar", "phoneNumber",
        "userAccount", "userPassword", "userRole"})
public class UserInfoAddRequest implements Serializable {

    /**
     * 用户昵称
     */
    @NotBlank(message = "用户昵称不能为空")
    @Schema(description = "用户昵称", example = "chenxinzhi")
    private String nickName;

    /**
     * 用户头像URL
     */
    @NotBlank(message = "用户头像URL不能为空")
    @Schema(description = "用户头像URL", example = "http://xxx.png")
    private String userAvatar;

    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空")
    @Schema(description = "手机号", example = "15888610253")
    private String phoneNumber;

    /**
     * 账号
     */
    @NotBlank(message = "账号不能为空")
    @Schema(description = "账号", example = "qingcheng_account")
    private String userAccount;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Schema(description = "密码", example = "qingcheng_password")
    private String userPassword;

    /**
     * 邀请码
     */
    @Schema(description = "邀请码", example = "666999")
    private String invitationCode;

    /**
     * 用户角色
     */
    @NotBlank(message = "用户角色不能为空")
    @Schema(description = "用户角色", example = "user")
    private String userRole;

    /**
     * 上级用户id
     */
    @Schema(description = "上级用户id", example = "1")
    private Long parentUserId;

    /**
     * 上级用户列表（1,2,3）
     */
    @Schema(description = "上级用户列表（1,2,3）", example = "1, 2, 3")
    private String superUserList;


    @Serial
    private static final long serialVersionUID = 1L;
}
