package com.tsi.api.server.controller.result;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

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

@Getter
@Setter
@ToString
public abstract class AbstractTscSsipApiResult {

    protected int resultCode;
    protected String resultDesc;

    private String timestamp;
    private int status;
    private String message;
    private int count;

    public AbstractTscSsipApiResult(int status, String message) {
        this.status = status;
        this.message = message;
        this.count = 0;

        Date date = new Date();
        SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        sdf.setTimeZone(java.util.TimeZone.getTimeZone("GMT+9"));
        this.timestamp = sdf.format(date);
    }
}
