/*
 * 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 IMKey extends VertxPojo, Serializable {

    /**
     * Setter for <code>DB_ETERNAL.M_KEY.KEY</code>. 「key」- 键ID
     */
    public IMKey setKey(String value);

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

    /**
     * Setter for <code>DB_ETERNAL.M_KEY.NAME</code>. 「name」- 键名称
     */
    public IMKey setName(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_KEY.NAME</code>. 「name」- 键名称
     */
    public String getName();

    /**
     * Setter for <code>DB_ETERNAL.M_KEY.TYPE</code>. 「type」- 键类型
     */
    public IMKey setType(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_KEY.TYPE</code>. 「type」- 键类型
     */
    public String getType();

    /**
     * Setter for <code>DB_ETERNAL.M_KEY.COLUMNS</code>. 「columns」-
     * JsonArray格式，键覆盖的列集合
     */
    public IMKey setColumns(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_KEY.COLUMNS</code>. 「columns」-
     * JsonArray格式，键覆盖的列集合
     */
    public String getColumns();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        @Override
        public default IMKey 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::setColumns,json::getString,"COLUMNS","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("COLUMNS",getColumns());
                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;
        }

}
