package com.alterdekim.game.controller.result.async;

import com.alterdekim.game.xml.LocalDateTimeSerializer;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.LocalDateTime;

@Setter
@AllArgsConstructor
@NoArgsConstructor
@JsonRootName(value = "user")
public class ServerActionUser extends ServerActionCData {

    @JacksonXmlProperty(isAttribute = true, localName = "UserId")
    private Integer userId;

    @JacksonXmlProperty(isAttribute = true)
    private String hwId;

    @JacksonXmlProperty(isAttribute = true)
    private String ticketId;

    @JacksonXmlProperty(isAttribute = true, localName = "RoleFlags")
    private Integer roleFlags;

    @JacksonXmlProperty(isAttribute = true, localName = "BanDateExpired")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime banDateExpired;

    @JacksonXmlProperty(isAttribute = true, localName = "BanTextResourceID")
    private Long banTextResourceID;
}
