package com.snack.server.module.admin.dto.req;

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

import java.io.Serializable;

/**
 * 管理员登录请求
 */
@Data
@Schema(description = "管理员登录请求")
public class AdminLoginReq implements Serializable {

    @NotBlank(message = "用户名不能为空")
    @Schema(description = "用户名", example = "admin")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 50, message = "密码长度需在 6-50 之间")
    @Schema(description = "密码", example = "123456")
    private String password;

    @Schema(description = "记住我（延长 token 有效期）", example = "false")
    private Boolean rememberMe = false;
}
