package tech.easyflow.datacenter.meta.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.handler.FastjsonTypeHandler;
import tech.easyflow.common.entity.DateEntity;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import java.util.Map;

@Table(value = "tb_datacenter_dataset_version", comment = "数据集版本")
public class DatacenterDatasetVersion extends DateEntity implements Serializable {
    @Id(keyType = KeyType.Generator, value = "snowFlakeId")
    private BigInteger id;
    @Column(comment = "部门ID")
    private BigInteger deptId;
    @Column(tenantId = true, comment = "租户ID")
    private BigInteger tenantId;
    @Column(comment = "表ID")
    private BigInteger tableId;
    @Column(comment = "版本号")
    private Integer versionNo;
    @Column(comment = "版本标签")
    private String versionLabel;
    @Column(comment = "物化表名")
    private String materializedTable;
    @Column(typeHandler = FastjsonTypeHandler.class, comment = "版本快照")
    private Map<String, Object> snapshotJson;
    @Column(comment = "状态")
    private Integer status;
    @Column(comment = "创建时间")
    private Date created;
    @Column(comment = "创建人")
    private BigInteger createdBy;
    @Column(comment = "修改时间")
    private Date modified;
    @Column(comment = "修改人")
    private BigInteger modifiedBy;

    public BigInteger getId() { return id; }
    public void setId(BigInteger id) { this.id = id; }
    public BigInteger getDeptId() { return deptId; }
    public void setDeptId(BigInteger deptId) { this.deptId = deptId; }
    public BigInteger getTenantId() { return tenantId; }
    public void setTenantId(BigInteger tenantId) { this.tenantId = tenantId; }
    public BigInteger getTableId() { return tableId; }
    public void setTableId(BigInteger tableId) { this.tableId = tableId; }
    public Integer getVersionNo() { return versionNo; }
    public void setVersionNo(Integer versionNo) { this.versionNo = versionNo; }
    public String getVersionLabel() { return versionLabel; }
    public void setVersionLabel(String versionLabel) { this.versionLabel = versionLabel; }
    public String getMaterializedTable() { return materializedTable; }
    public void setMaterializedTable(String materializedTable) { this.materializedTable = materializedTable; }
    public Map<String, Object> getSnapshotJson() { return snapshotJson; }
    public void setSnapshotJson(Map<String, Object> snapshotJson) { this.snapshotJson = snapshotJson; }
    public Integer getStatus() { return status; }
    public void setStatus(Integer status) { this.status = status; }
    @Override public Date getCreated() { return created; }
    @Override public void setCreated(Date created) { this.created = created; }
    public BigInteger getCreatedBy() { return createdBy; }
    public void setCreatedBy(BigInteger createdBy) { this.createdBy = createdBy; }
    @Override public Date getModified() { return modified; }
    @Override public void setModified(Date modified) { this.modified = modified; }
    public BigInteger getModifiedBy() { return modifiedBy; }
    public void setModifiedBy(BigInteger modifiedBy) { this.modifiedBy = modifiedBy; }
}
