package ink.wgink.pojo.result;

/**
 * @ClassName SuccessResultCode
 * @Description 返回结果带对象
 * @Author WangGeng
 * @Date 2019/3/11 9:31 AM
 * @Version 1.0
 **/
public class SuccessResultCode<T> extends SuccessResult {

    private static final long serialVersionUID = 2292105832378967169L;
    private T code;

    public SuccessResultCode() {
    }

    public SuccessResultCode(T code) {
        this.code = code;
    }

    public T getCode() {
        return code;
    }

    public void setCode(T code) {
        this.code = code;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"code\":")
                .append(code);
        sb.append('}');
        return sb.toString();
    }
}
