package com.bohuikeji.frame.module.admin.base;

import com.alibaba.fastjson.JSON;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;

/**
 * 系统超类
 * @author 10552
 */
@Data
public class SuperBase implements Serializable {
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
    }

    /**
     * 转换为JSON对象
     * @return
     */
    public String toJsonStr(){
        return JSON.toJSONString(this);
    }
}
