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_TEST_QUESTION")
@ApiModel(description = "试题表")
public class YcqYjsTestQuestion 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 = "topic")
    @ApiModelProperty(name = "题目",notes = "")
    private String topic;

    @Column(name = "topic_type")
    @ApiModelProperty(name = "题目类型（1单选题2多选题3判断题）",notes = "")
    private Integer topicType;

    @Column(name = "topic_classify_id")
    @ApiModelProperty(name = "题目分类字典id",notes = "")
    private BigInteger topicClassifyId;

    @Column(name = "topic_classify_name")
    @ApiModelProperty(name = "题目分类名称",notes = "")
    private String topicClassifyName;

    @Column(name = "organize_id")
    @ApiModelProperty(name = "业务id",notes = "")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private BigInteger organizeId;

    @Column(name = "organize_name")
    @ApiModelProperty(name = "业务名称",notes = "")
    private String organizeName;

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

    @Column(name = "remark")
    @ApiModelProperty(name = "备注",notes = "")
    private String remark;

    @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;

}