package cn.estsh.i3plus.pojo.screen.model;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Wynne.Lu
 * @date 2021/6/29 21:54
 * @desc
 */
@Data
@NoArgsConstructor
@ApiModel("类信息")
public class ScrClassInfoModel {

    private String classSimpleName;

    private String classDescription;

    private Class<?> clazz;

    public ScrClassInfoModel(Class<?> clazz) {
        this.clazz = clazz;

        this.classSimpleName = clazz.getSimpleName();

        ApiModel apiModel = clazz.getAnnotation(ApiModel.class);
        if (apiModel != null) {
            this.classDescription = apiModel.value();
        }
    }
}
