package com.hertz.modules.system.dto;

import jakarta.validation.constraints.NotBlank;
import java.util.List;

public class AuthDtos {
  public record LoginRequest(
      @NotBlank(message = "用户名不能为空") String username,
      @NotBlank(message = "密码不能为空") String password,
      String uuid,
      String code
  ) {
  }

  public record RegisterRequest(
      @NotBlank(message = "用户名不能为空") String username,
      @NotBlank(message = "密码不能为空") String password,
      @NotBlank(message = "昵称不能为空") String nickname,
      String uuid,
      String code
  ) {
  }

  public record LoginResponse(
      String token,
      long userId,
      String username,
      List<String> roles
  ) {
  }

  public record MeResponse(
      long userId,
      String username,
      String nickname,
      String avatarPath,
      String phone,
      String email,
      Integer gender,
      List<String> roles
  ) {
  }

  public record UpdateProfileRequest(
      @NotBlank(message = "昵称不能为空") String nickname,
      String avatarPath,
      String phone,
      String email,
      Integer gender
  ) {
  }

  public record UpdatePasswordRequest(
      @NotBlank(message = "旧密码不能为空") String oldPassword,
      @NotBlank(message = "新密码不能为空") String newPassword
  ) {
  }

  public record CaptchaResponse(
      @com.fasterxml.jackson.annotation.JsonProperty("uuid") String uuid,
      @com.fasterxml.jackson.annotation.JsonProperty("img") String img
  ) {
  }
}

