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

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 动态表单数据表;
 * @author : zjw
 * @date : 2023-11-27
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of = {"id"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "动态表单数据表")
@Table(name="YCQ_DYNAMIC_RECORD")
public class YcqDynamicRecord implements Serializable{
    /** 主键 */
    @ApiModelProperty(value = "主键")
    @Id
    @GeneratedValue(generator = "idGenerator")
    private Long id ;
    /** 业务主键id */
    @ApiModelProperty(value = "业务主键id")
    @Column(name = "BUSINESS_ID")
    private String businessId ;
    /** 提交的数据json */
    @ApiModelProperty(value = "提交的数据json")
    @Column(name = "RECORD_JSON")
    private String recordJson ;
    /** 创建人 */
    @ApiModelProperty(value = "创建人")
    @Column(name = "CREATE_ID")
    private Integer createId ;
    /** 创建时间 */
    @ApiModelProperty(value = "创建时间")
    @Column(name = "CREATE_TIME")
    private Date createTime ;
    /** 更新人 */
    @ApiModelProperty(value = "更新人")
    @Column(name = "UPDATE_ID")
    private Integer updateId ;
    /** 更新时间 */
    @ApiModelProperty(value = "更新时间")
    @Column(name = "UPDATE_TIME")
    private Date updateTime ;
    /** 是否被删除 */
    @ApiModelProperty(value = "是否被删除")
    @Column(name = "IS_DELETE")
    private Integer isDelete ;
    /** 乐观锁 */
    @ApiModelProperty(value = "乐观锁")
    @Column(name = "REVISION")
    private Integer revision ;

    @ApiModelProperty(value = "创建人")
    @Column(name = "CREATE_NAME")
    private String createName ;



    /** 主键 */
    public Long getId(){
        return this.id;
    }
    /** 主键 */
    public void setId(Long id){
        this.id=id;
    }
    /** 业务主键id */
    public String getBusinessId(){
        return this.businessId;
    }
    /** 业务主键id */
    public void setBusinessId(String businessId){
        this.businessId=businessId;
    }
    /** 提交的数据json */
    public String getRecordJson(){
        return this.recordJson;
    }
    /** 提交的数据json */
    public void setRecordJson(String recordJson){
        this.recordJson=recordJson;
    }
    /** 创建人 */
    public Integer getCreateId(){
        return this.createId;
    }
    /** 创建人 */
    public void setCreateId(Integer createId){
        this.createId=createId;
    }
    /** 创建时间 */
    public Date getCreateTime(){
        return this.createTime;
    }
    /** 创建时间 */
    public void setCreateTime(Date createTime){
        this.createTime=createTime;
    }
    /** 更新人 */
    public Integer getUpdateId(){
        return this.updateId;
    }
    /** 更新人 */
    public void setUpdateId(Integer updateId){
        this.updateId=updateId;
    }
    /** 更新时间 */
    public Date getUpdateTime(){
        return this.updateTime;
    }
    /** 更新时间 */
    public void setUpdateTime(Date updateTime){
        this.updateTime=updateTime;
    }
    /** 是否被删除 */
    public Integer getIsDelete(){
        return this.isDelete;
    }
    /** 是否被删除 */
    public void setIsDelete(Integer isDelete){
        this.isDelete=isDelete;
    }
    /** 乐观锁 */
    public Integer getRevision(){
        return this.revision;
    }
    /** 乐观锁 */
    public void setRevision(Integer revision){
        this.revision=revision;
    }
}