package com.smyhub.infogenie.infogeniebackendjava.filter;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

/**
 * Represents the user object returned by the auth-center verify endpoint.
 * Stored as a request attribute under the key AUTH_USER_ATTR after a successful
 * token verification so controllers can read it without re-calling the auth center.
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class AuthCenterUser {

    public static final String AUTH_USER_ATTR = "authCenterUser";

    private String account;
    private String username;
    private String email;
    private String avatar;
    private Integer level;

    @JsonProperty("sprout_coins")
    private Integer sproutCoins;

    @JsonProperty("checkin_days")
    private Integer checkinDays;

    @JsonProperty("checkin_streak")
    private Integer checkinStreak;

    @JsonProperty("auth_user")
    private String authUser;

    @JsonProperty("ban_reason")
    private String banReason;
}
