package com.jeesharp.business.modules.member.dto;

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

/**
 * 邮箱验证码登录请求
 * 参考：https://developer.huawei.com/consumer/cn/doc/app/agc-help-auth-login-email-0000002236496830
 *
 * @author jeesharp
 */
@Data
@Schema(description = "邮箱验证码登录请求")
public class LoginByEmailDTO {

    @Schema(description = "邮箱地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "user@example.com")
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;

    @Schema(description = "邮件验证码", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
    @NotBlank(message = "验证码不能为空")
    private String emailCode;

    @Schema(description = "邀请码", example = "ABC123")
    private String inviteCode;

    @Schema(description = "设备ID", example = "device_xxx")
    private String deviceId;

    @Schema(description = "平台：APP、MINI、H5", example = "APP")
    private String platform;

    // ==================== 推送设备（可选，登录成功后自动注册并绑定） ====================

    @Schema(description = "应用ID（与 pushToken 同时传入时生效）")
    private String appId;

    @Schema(description = "推送通道Token（HMS/APNS/FCM 等）")
    private String pushToken;

    @Schema(description = "推送通道：HMS、APNS、FCM、JPUSH")
    private String pushChannel;
}
