package tech.easyflow.datacenter.entity.base;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.core.handler.FastjsonTypeHandler;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import java.util.Map;
import tech.easyflow.common.entity.DateEntity;


public class DatacenterTableFieldBase extends DateEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id(keyType = KeyType.Generator, value = "snowFlakeId", comment = "主键")
    private BigInteger id;

    /**
     * 数据表ID
     */
    @Column(comment = "数据表ID")
    private BigInteger tableId;

    /**
     * 字段名称
     */
    @Column(comment = "字段名称")
    private String fieldName;

    /**
     * 源字段名
     */
    @Column(comment = "源字段名")
    private String sourceColumnName;

    /**
     * 字段描述
     */
    @Column(comment = "字段描述")
    private String fieldDesc;

    /**
     * 字段类型
     */
    @Column(comment = "字段类型")
    private Integer fieldType;

    /**
     * JDBC 类型
     */
    @Column(comment = "JDBC类型")
    private String jdbcType;

    /**
     * 精度
     */
    @Column(comment = "精度")
    private Integer precision;

    /**
     * 小数位
     */
    @Column(comment = "小数位")
    private Integer scale;

    /**
     * 是否必填
     */
    @Column(comment = "是否必填")
    private Integer required;

    /**
     * 可查询
     */
    @Column(comment = "可查询")
    private Integer queryable;

    /**
     * 可排序
     */
    @Column(comment = "可排序")
    private Integer sortable;

    /**
     * 可写入
     */
    @Column(comment = "可写入")
    private Integer writable;

    /**
     * 是否索引
     */
    @Column(comment = "是否索引")
    private Integer indexed;

    /**
     * 扩展项
     */
    @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 getTableId() {
        return tableId;
    }

    public void setTableId(BigInteger tableId) {
        this.tableId = tableId;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public String getSourceColumnName() {
        return sourceColumnName;
    }

    public void setSourceColumnName(String sourceColumnName) {
        this.sourceColumnName = sourceColumnName;
    }

    public String getFieldDesc() {
        return fieldDesc;
    }

    public void setFieldDesc(String fieldDesc) {
        this.fieldDesc = fieldDesc;
    }

    public Integer getFieldType() {
        return fieldType;
    }

    public void setFieldType(Integer fieldType) {
        this.fieldType = fieldType;
    }

    public String getJdbcType() {
        return jdbcType;
    }

    public void setJdbcType(String jdbcType) {
        this.jdbcType = jdbcType;
    }

    public Integer getPrecision() {
        return precision;
    }

    public void setPrecision(Integer precision) {
        this.precision = precision;
    }

    public Integer getScale() {
        return scale;
    }

    public void setScale(Integer scale) {
        this.scale = scale;
    }

    public Integer getRequired() {
        return required;
    }

    public void setRequired(Integer required) {
        this.required = required;
    }

    public Integer getQueryable() {
        return queryable;
    }

    public void setQueryable(Integer queryable) {
        this.queryable = queryable;
    }

    public Integer getSortable() {
        return sortable;
    }

    public void setSortable(Integer sortable) {
        this.sortable = sortable;
    }

    public Integer getWritable() {
        return writable;
    }

    public void setWritable(Integer writable) {
        this.writable = writable;
    }

    public Integer getIndexed() {
        return indexed;
    }

    public void setIndexed(Integer indexed) {
        this.indexed = indexed;
    }

    public Map<String, Object> getOptions() {
        return options;
    }

    public void setOptions(Map<String, Object> options) {
        this.options = options;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public BigInteger getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(BigInteger createdBy) {
        this.createdBy = createdBy;
    }

    public Date getModified() {
        return modified;
    }

    public void setModified(Date modified) {
        this.modified = modified;
    }

    public BigInteger getModifiedBy() {
        return modifiedBy;
    }

    public void setModifiedBy(BigInteger modifiedBy) {
        this.modifiedBy = modifiedBy;
    }

}
