package cn.novalon.gym.manage.auth.dto;

import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 手机号一键登录请求DTO
 * uniapp官方一键登录流程：前端通过云函数获取access_token和openid传给后端换取手机号
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PhoneLoginDto {

    @NotBlank(message = "access_token不能为空")
    private String accessToken;

    @NotBlank(message = "openid不能为空")
    private String openid;

    private String nickname;

    private String avatar;
}
