package cn.cslg.pas.domain;

import cn.cslg.pas.common.model.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.List;

/**
 * <p>
 * 专利信息自定义字段表
 * </p>
 *
 * @author 王岩
 * @since 2021-12-16
 */
@Data
@TableName("os_patent_field")
public class ProjectField extends BaseEntity<ProjectField> {

    /**
     * 自定义字段名称
     */
    private String name;

    /**
     * 1.是标引 2.是分类
     */
    private Integer ptype;

    /**
     * 字段类型
     */
    private Integer type;

    /**
     * 状态（1正常、0关闭）
     */
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人账户ID
     */
    @TableField("cid")
    private Integer createBy;

    /**
     * 创建时间
     */
    @TableField("createtime")
    private Integer createTime;

    /**
     * 专题库
     */
    private Integer projectId;

    /**
     * 拓展类型
     */
    @TableField(exist = false)
    public List<ProjectFieldExpand> expand;

    /**
     * 选项
     */
    @TableField(exist = false)
    private List<ProjectFieldOption> 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;
    }
}
