package cn.sh.stc.sict.theme.hphy.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * 问卷答案
 *
 * @author F_xh
 * @date 2020-09-30 14:16:33
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("hphy_question_option")
public class HphyQuestionOption extends Model<HphyQuestionOption> {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    @ApiModelProperty(hidden = false, value = "id")
    private Long id;
    private Long questionId;

    @ApiModelProperty(hidden = false, value = "对应健海答案id")
    private String jhId;
    /**
     * 分组id
     */
    @ApiModelProperty(hidden = false, value = "分组id")
    private Integer groupId;
    /**
     * 下一题id
     */
    @ApiModelProperty(hidden = false, value = "下一题id")
    private Long nextQuestionId;
    /**
     * 选项
     */
    @ApiModelProperty(hidden = false, value = "选项")
    private String title;

    @ApiModelProperty(hidden = false, value = "互斥答案：0-否 1-是")
    private Byte isNotAll;
    /**
     * 顺序asc
     */
    @ApiModelProperty(hidden = false, value = "顺序asc")
    private Integer sort;
    private String tag;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(hidden = true, value = "更新时间")
    private Date updateTime;

    /**
     * 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
