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


import com.fasterxml.jackson.annotation.JsonRootName;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.text.SimpleDateFormat;
import java.util.Date;

@Setter
@AllArgsConstructor
@NoArgsConstructor
@JsonRootName(value = "system")
public class ServerActionSystem extends ServerActionCData {

    @JacksonXmlProperty(isAttribute = true, localName = "RVersion")
    private Integer rVersion;

    @JacksonXmlProperty(isAttribute = true, localName = "RPath")
    private String rPath;

    @JacksonXmlProperty(isAttribute = true, localName = "ServerDate")
    public String ServerDate() {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = new Date();
        return format.format(date);
    }
}
