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_catalog", comment = "数据中心逻辑库/命名空间")
public class DatacenterCatalog extends DateEntity implements Serializable {

    @Id(keyType = KeyType.Generator, value = "snowFlakeId", comment = "主键")
    private BigInteger id;
    @Column(comment = "部门ID")
    private BigInteger deptId;
    @Column(tenantId = true, comment = "租户ID")
    private BigInteger tenantId;
    @Column(comment = "数据源ID")
    private BigInteger sourceId;
    @Column(comment = "目录名")
    private String catalogName;
    @Column(comment = "目录描述")
    private String catalogDesc;
    @Column(comment = "目录类型")
    private String catalogType;
    @Column(comment = "状态")
    private Integer status;
    @Column(typeHandler = FastjsonTypeHandler.class, comment = "扩展项")
    private Map<String, Object> options;
    @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 getSourceId() { return sourceId; }
    public void setSourceId(BigInteger sourceId) { this.sourceId = sourceId; }
    public String getCatalogName() { return catalogName; }
    public void setCatalogName(String catalogName) { this.catalogName = catalogName; }
    public String getCatalogDesc() { return catalogDesc; }
    public void setCatalogDesc(String catalogDesc) { this.catalogDesc = catalogDesc; }
    public String getCatalogType() { return catalogType; }
    public void setCatalogType(String catalogType) { this.catalogType = catalogType; }
    public Integer getStatus() { return status; }
    public void setStatus(Integer status) { this.status = status; }
    public Map<String, Object> getOptions() { return options; }
    public void setOptions(Map<String, Object> options) { this.options = options; }
    @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; }
}
