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

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import javax.persistence.Column;
import java.io.Serializable;

/**
 * @Description : 类属性选择模型
 * @Reference :
 * @Author : alwaysfrin
 * @CreateDate : 2018-12-29 15:17
 * @Modify:
 **/
@Data
public class ClassFieldModel implements Serializable {

    private static final long serialVersionUID = -8873901724079105728L;
    @ApiParam(value ="包名")
    private String packageName;

    @ApiParam(value ="类名")
    private String clzSimpleName;

    @ApiParam(value ="类全名")
    private String clzFullName;

    @ApiParam(value ="属性名")
    private String fieldName;

    @ApiParam(value ="字段名称")
    private String fieldColumnName;

    @ApiParam(value ="属性类型名称")
    private String fieldTypeName;

    @ApiParam(value ="属性别名")
    private String fieldNameAlias;

    @ApiParam(value ="属性描述")
    private String fieldDesc;

    @ApiParam(value ="聚合ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long aggregationId;

//    "clzFullName": "cn.estsh.i3plus.pojo.report.bean.BrRefRoleMenu",
//            "fieldName": "menuNameRdd",


    @ApiParam(value ="属性全路径")
    public String getFieldNameInfo(){
        return this.clzFullName + "." + this.fieldName;
    }

}
