package com.willalp.common.core.domain;

import com.willalp.common.utils.MessageUtils;

import java.io.Serializable;

public class ReturnEntity<E> implements Serializable {

    private String message;

    private E date;

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public E getDate() {
        return date;
    }

    public void setDate(E date) {
        this.date = date;
    }

    public ReturnEntity<E> setReturnMessage(String code) {
        return this.setReturnMessage(code, null);
    }

    public ReturnEntity<E> setReturnMessage(String code, Object[] args) {
        this.message = MessageUtils.message(code, args);
        return this;
    }

}
