package cn.cslg.report.entity;

import cn.cslg.report.common.model.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 专利信息自定义字段表
 * </p>
 *
 * @author 王岩
 * @since 2021-12-16
 */
@Data
@TableName("OS_PATENT_FIELD")
public class ReportField extends BaseEntity<ReportField> {
    /**
     * 自定义字段名称
     */
    @Schema(description ="自定义字段名称")
    @TableField("NAME")
    private String name;

    /**
     * 1.是标引 2.是分类
     */
    @Schema(description ="1.是标引 2.是分类")
    @TableField("PTYPE")
    private Integer ptype;

    /**
     * 字段类型
     */
    @TableField("TYPE")
    @Schema(description ="字段类型",required = true)
    private Integer type;

    /**
     * 状态（正常、关闭）
     */
    @TableField("STATUS")
    @Schema(description ="状态（正常、关闭）")
    private Integer status;

    /**
     * 备注
     */
    @TableField("REMARK")
    @Schema(description ="备注")
    private String remark;

    /**
     * 创建人账户ID
     */
    @Schema(description ="创建人账户ID")
    @TableField("CID")
    private Integer createBy;

    /**
     * 创建时间
     */
    @Schema(description ="创建时间")
    @TableField("CREATE_TIME")
    private Date createTime;

    /**
     * 报告Id
     */
    @TableField("REPORT_ID")
    @Schema(description ="报告id")
    private Integer reportId;

    @TableField("REPORT_TYPE")
    @Schema(description ="字段类型")
    private Integer reportType;
    /**
     * 拓展类型
     */
    @Schema(description ="拓展类型")
    @TableField(exist = false)
    public List<ReportFieldExpand> expand;

    /**
     * 选项
     */
    @Schema(description ="选项")
    @TableField(exist = false)
    private List<ReportFieldOption> option;

    @TableField(exist = false)
    private String createName;

    @TableField(exist = false)
    private Boolean enabled = false;

    @TableField(exist = false)
    private String text;

    @TableField(exist = false)
    private List<Integer> selected;

    @TableField(exist = false)
    private String projectName;

    @Data
    public static class dataType {
        private String name;
        private Object id;
    }
}
