package com.crunii.micro.feign.client.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;

@Entity
@DynamicInsert
@DynamicUpdate
@ToString
@Data
@EqualsAndHashCode(of= {"id"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@Table(name="YCQ_YJS_TOPIC_OPTION")
@ApiModel(description = "题目选项表")
public class YcqYjsTopicOption implements Serializable{

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(name = "主键id",notes = "")
    private BigInteger id;

    @Column(name = "OPTION")
    @ApiModelProperty(name = "选项",notes = "")
    private String option;

    @Column(name = "option_content")
    @ApiModelProperty(name = "选项内容",notes = "")
    private String optionContent;

    @Column(name = "is_answer")
    @ApiModelProperty(name = "是否为答案（1是答案0不是答案）",notes = "")
    private Integer isAnswer;

    @Column(name = "test_question_id")
    @ApiModelProperty(name = "所属题目ID",notes = "")
    private BigInteger testQuestionId;

    @Column(name = "del_flag")
    @ApiModelProperty(name = "是否删除（1删除0未删除）",notes = "")
    private Integer delFlag;

    @Column(name = "CREATED_BY")
    @ApiModelProperty(name = "创建人ID",notes = "")
    private BigInteger createdBy;

    @Column(name = "CREATED_TIME")
    @ApiModelProperty(name = "创建时间",notes = "")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @Column(name = "UPDATED_BY")
    @ApiModelProperty(name = "更新人ID",notes = "")
    private BigInteger updatedBy;

    @Column(name = "UPDATED_TIME")
    @ApiModelProperty(name = "更新时间",notes = "")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

}