/*
 * This file is generated by jOOQ.
 */
package cn.vertxup.atom.domain.tables.interfaces;


import io.github.jklingsporn.vertx.jooq.shared.internal.VertxPojo;

import java.io.Serializable;
import java.time.LocalDateTime;

import static io.github.jklingsporn.vertx.jooq.shared.internal.VertxPojo.setOrThrow;
/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public interface IMField extends VertxPojo, Serializable {

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.KEY</code>. 「key」- 字段ID
     */
    public IMField setKey(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.KEY</code>. 「key」- 字段ID
     */
    public String getKey();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.NAME</code>. 「name」- 属性名（非列）
     */
    public IMField setName(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.NAME</code>. 「name」- 属性名（非列）
     */
    public String getName();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.TYPE</code>. 「type」- OX核心类型
     */
    public IMField setType(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.TYPE</code>. 「type」- OX核心类型
     */
    public String getType();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.COLUMN_NAME</code>. 「columnName」-
     * 数据库列名
     */
    public IMField setColumnName(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.COLUMN_NAME</code>. 「columnName」-
     * 数据库列名
     */
    public String getColumnName();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.COLUMN_TYPE</code>. 「columnType」-
     * 数据库转换过后的类型
     */
    public IMField setColumnType(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.COLUMN_TYPE</code>. 「columnType」-
     * 数据库转换过后的类型
     */
    public String getColumnType();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.IS_PRIMARY</code>. 「isPrimary」- 是否为主键
     */
    public IMField setIsPrimary(Boolean value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.IS_PRIMARY</code>. 「isPrimary」- 是否为主键
     */
    public Boolean getIsPrimary();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.IS_NULLABLE</code>. 「isNullable」-
     * 是否可为空
     */
    public IMField setIsNullable(Boolean value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.IS_NULLABLE</code>. 「isNullable」-
     * 是否可为空
     */
    public Boolean getIsNullable();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.LENGTH</code>. 「length」- String类型的长度
     */
    public IMField setLength(Integer value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.LENGTH</code>. 「length」- String类型的长度
     */
    public Integer getLength();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.PRECISION</code>. 「precision」-
     * Decimal类型的精度
     */
    public IMField setPrecision(Integer value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.PRECISION</code>. 「precision」-
     * Decimal类型的精度
     */
    public Integer getPrecision();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.FORMAT</code>. 「format」-
     * 当前数据列的格式，String或Date类型
     */
    public IMField setFormat(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.FORMAT</code>. 「format」-
     * 当前数据列的格式，String或Date类型
     */
    public String getFormat();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.IN_COMPONENT</code>. 「inComponent」-
     * 写入插件
     */
    public IMField setInComponent(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.IN_COMPONENT</code>. 「inComponent」-
     * 写入插件
     */
    public String getInComponent();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.OUT_COMPONENT</code>. 「outComponent」-
     * 读取插件
     */
    public IMField setOutComponent(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.OUT_COMPONENT</code>. 「outComponent」-
     * 读取插件
     */
    public String getOutComponent();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.ENTITY_ID</code>. 「entityId」- 关联的实体ID
     */
    public IMField setEntityId(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.ENTITY_ID</code>. 「entityId」- 关联的实体ID
     */
    public String getEntityId();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.COMMENTS</code>. 「comments」-
     * 当前属性的描述信息
     */
    public IMField setComments(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.COMMENTS</code>. 「comments」-
     * 当前属性的描述信息
     */
    public String getComments();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.SIGMA</code>. 「sigma」- 统一标识
     */
    public IMField setSigma(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.SIGMA</code>. 「sigma」- 统一标识
     */
    public String getSigma();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.LANGUAGE</code>. 「language」- 使用的语言
     */
    public IMField setLanguage(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.LANGUAGE</code>. 「language」- 使用的语言
     */
    public String getLanguage();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.ACTIVE</code>. 「active」- 是否启用
     */
    public IMField setActive(Boolean value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.ACTIVE</code>. 「active」- 是否启用
     */
    public Boolean getActive();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.METADATA</code>. 「metadata」- 附加配置数据
     */
    public IMField setMetadata(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.METADATA</code>. 「metadata」- 附加配置数据
     */
    public String getMetadata();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.CREATED_AT</code>. 「createdAt」- 创建时间
     */
    public IMField setCreatedAt(LocalDateTime value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.CREATED_AT</code>. 「createdAt」- 创建时间
     */
    public LocalDateTime getCreatedAt();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.CREATED_BY</code>. 「createdBy」- 创建人
     */
    public IMField setCreatedBy(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.CREATED_BY</code>. 「createdBy」- 创建人
     */
    public String getCreatedBy();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.UPDATED_AT</code>. 「updatedAt」- 更新时间
     */
    public IMField setUpdatedAt(LocalDateTime value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.UPDATED_AT</code>. 「updatedAt」- 更新时间
     */
    public LocalDateTime getUpdatedAt();

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.UPDATED_BY</code>. 「updatedBy」- 更新人
     */
    public IMField setUpdatedBy(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.UPDATED_BY</code>. 「updatedBy」- 更新人
     */
    public String getUpdatedBy();

    // -------------------------------------------------------------------------
    // FROM and INTO
    // -------------------------------------------------------------------------

    /**
     * Load data from another generated Record/POJO implementing the common
     * interface IMField
     */
    public void from(IMField from);

    /**
     * Copy data into another generated Record/POJO implementing the common
     * interface IMField
     */
    public <E extends IMField> E into(E into);

        @Override
        public default IMField fromJson(io.vertx.core.json.JsonObject json) {
                setOrThrow(this::setKey,json::getString,"KEY","java.lang.String");
                setOrThrow(this::setName,json::getString,"NAME","java.lang.String");
                setOrThrow(this::setType,json::getString,"TYPE","java.lang.String");
                setOrThrow(this::setColumnName,json::getString,"COLUMN_NAME","java.lang.String");
                setOrThrow(this::setColumnType,json::getString,"COLUMN_TYPE","java.lang.String");
                setOrThrow(this::setIsPrimary,json::getBoolean,"IS_PRIMARY","java.lang.Boolean");
                setOrThrow(this::setIsNullable,json::getBoolean,"IS_NULLABLE","java.lang.Boolean");
                setOrThrow(this::setLength,json::getInteger,"LENGTH","java.lang.Integer");
                setOrThrow(this::setPrecision,json::getInteger,"PRECISION","java.lang.Integer");
                setOrThrow(this::setFormat,json::getString,"FORMAT","java.lang.String");
                setOrThrow(this::setInComponent,json::getString,"IN_COMPONENT","java.lang.String");
                setOrThrow(this::setOutComponent,json::getString,"OUT_COMPONENT","java.lang.String");
                setOrThrow(this::setEntityId,json::getString,"ENTITY_ID","java.lang.String");
                setOrThrow(this::setComments,json::getString,"COMMENTS","java.lang.String");
                setOrThrow(this::setSigma,json::getString,"SIGMA","java.lang.String");
                setOrThrow(this::setLanguage,json::getString,"LANGUAGE","java.lang.String");
                setOrThrow(this::setActive,json::getBoolean,"ACTIVE","java.lang.Boolean");
                setOrThrow(this::setMetadata,json::getString,"METADATA","java.lang.String");
                setOrThrow(this::setCreatedAt,key -> {String s = json.getString(key); return s==null?null:java.time.LocalDateTime.parse(s);},"CREATED_AT","java.time.LocalDateTime");
                setOrThrow(this::setCreatedBy,json::getString,"CREATED_BY","java.lang.String");
                setOrThrow(this::setUpdatedAt,key -> {String s = json.getString(key); return s==null?null:java.time.LocalDateTime.parse(s);},"UPDATED_AT","java.time.LocalDateTime");
                setOrThrow(this::setUpdatedBy,json::getString,"UPDATED_BY","java.lang.String");
                return this;
        }


        @Override
        public default io.vertx.core.json.JsonObject toJson() {
                io.vertx.core.json.JsonObject json = new io.vertx.core.json.JsonObject();
                json.put("KEY",getKey());
                json.put("NAME",getName());
                json.put("TYPE",getType());
                json.put("COLUMN_NAME",getColumnName());
                json.put("COLUMN_TYPE",getColumnType());
                json.put("IS_PRIMARY",getIsPrimary());
                json.put("IS_NULLABLE",getIsNullable());
                json.put("LENGTH",getLength());
                json.put("PRECISION",getPrecision());
                json.put("FORMAT",getFormat());
                json.put("IN_COMPONENT",getInComponent());
                json.put("OUT_COMPONENT",getOutComponent());
                json.put("ENTITY_ID",getEntityId());
                json.put("COMMENTS",getComments());
                json.put("SIGMA",getSigma());
                json.put("LANGUAGE",getLanguage());
                json.put("ACTIVE",getActive());
                json.put("METADATA",getMetadata());
                json.put("CREATED_AT",getCreatedAt()==null?null:getCreatedAt().toString());
                json.put("CREATED_BY",getCreatedBy());
                json.put("UPDATED_AT",getUpdatedAt()==null?null:getUpdatedAt().toString());
                json.put("UPDATED_BY",getUpdatedBy());
                return json;
        }

}
