/*
 * This file is generated by jOOQ.
 */
package cn.vertxup.ui.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 IUiLayout extends VertxPojo, Serializable {

    /**
     * Setter for <code>DB_ETERNAL.UI_LAYOUT.KEY</code>. 「key」- Tpl模板唯一主键
     */
    public IUiLayout setKey(String value);

    /**
     * Getter for <code>DB_ETERNAL.UI_LAYOUT.KEY</code>. 「key」- Tpl模板唯一主键
     */
    public String getKey();

    /**
     * Setter for <code>DB_ETERNAL.UI_LAYOUT.NAME</code>. 「name」- Tpl模板名称
     */
    public IUiLayout setName(String value);

    /**
     * Getter for <code>DB_ETERNAL.UI_LAYOUT.NAME</code>. 「name」- Tpl模板名称
     */
    public String getName();

    /**
     * Setter for <code>DB_ETERNAL.UI_LAYOUT.CONFIG</code>. 「config」- 主配置
     */
    public IUiLayout setConfig(String value);

    /**
     * Getter for <code>DB_ETERNAL.UI_LAYOUT.CONFIG</code>. 「config」- 主配置
     */
    public String getConfig();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        @Override
        public default IUiLayout 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::setConfig,json::getString,"CONFIG","java.lang.String");
                setOrThrow(this::setActive,json::getBoolean,"ACTIVE","java.lang.Boolean");
                setOrThrow(this::setSigma,json::getString,"SIGMA","java.lang.String");
                setOrThrow(this::setMetadata,json::getString,"METADATA","java.lang.String");
                setOrThrow(this::setLanguage,json::getString,"LANGUAGE","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("CONFIG",getConfig());
                json.put("ACTIVE",getActive());
                json.put("SIGMA",getSigma());
                json.put("METADATA",getMetadata());
                json.put("LANGUAGE",getLanguage());
                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;
        }

}
