package com.crunii.micro.domain.entity.main;

import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "YCQ_DYNAMIC_FORM_CONFIG")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of = { "id" })
@ApiModel(description = "动态表单表")
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
public class YcqDynamicFormConfig {

    @Id
    @GeneratedValue(generator = "idGenerator")
    @Column(name = "id")
    @ApiModelProperty(value = "主键id")
    private Long id;

    @Column(name = "name")
    @ApiModelProperty(value = "表单名称")
    private String name;

    @Column(name = "code")
    @ApiModelProperty(value = "表单编码")
    private String code;

    @Column(name = "FLO_MODEL_ID")
    private Long floModelId;

    @Column(name = "FLO_MODEL_CODE")
    private String floModelCode;

    @Column(name = "html")
    @ApiModelProperty(value = "表单JSON")
    private String html;

    @Column(name = "DESCRIPTION")
    @ApiModelProperty(value = "备注")
    private String description;

    @Column(name = "create_id")
    @ApiModelProperty(value = "创建人")
    private Integer createId;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @Column(name = "update_id")
    @ApiModelProperty(value = "修改人")
    private Integer updateId;

    @Column(name = "update_time")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    @Column(name = "del_flag")
    @ApiModelProperty(value = "是否删除")
    private Byte delFlag;

    @Column(name = "is_tmp")
    private Byte isTmp;
}
