package com.ttstd.controller.network.model;

import com.google.gson.annotations.SerializedName;

/** 登录请求体，对应服务端 {@code POST /api/auth/login}。 */
public class LoginRequest {

    @SerializedName("username")
    private final String username;

    @SerializedName("password")
    private final String password;

    /** 双因子动态码，未开启时传 null（Gson 默认忽略 null 字段）。 */
    @SerializedName("totpCode")
    private final String totpCode;

    public LoginRequest(String username, String password) {
        this(username, password, null);
    }

    public LoginRequest(String username, String password, String totpCode) {
        this.username = username;
        this.password = password;
        this.totpCode = totpCode;
    }
}
