/*
 * 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.math.BigDecimal;
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 IUiForm extends VertxPojo, Serializable {

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.KEY</code>. 「key」- 主键
     */
    public IUiForm setKey(String value);

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.NAME</code>. 「name」- 表单名称
     */
    public IUiForm setName(String value);

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.CODE</code>. 「code」- 表单系统编码
     */
    public IUiForm setCode(String value);

    /**
     * Getter for <code>DB_ETERNAL.UI_FORM.CODE</code>. 「code」- 表单系统编码
     */
    public String getCode();

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.WINDOW</code>. 「window」- window,
     * Form对应的窗口配置
     */
    public IUiForm setWindow(BigDecimal value);

    /**
     * Getter for <code>DB_ETERNAL.UI_FORM.WINDOW</code>. 「window」- window,
     * Form对应的窗口配置
     */
    public BigDecimal getWindow();

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.COLUMNS</code>. 「columns」- columns,
     * Form对应的配置
     */
    public IUiForm setColumns(Integer value);

    /**
     * Getter for <code>DB_ETERNAL.UI_FORM.COLUMNS</code>. 「columns」- columns,
     * Form对应的配置
     */
    public Integer getColumns();

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.HIDDEN</code>. 「hidden」- 隐藏字段专用配置
     */
    public IUiForm setHidden(String value);

    /**
     * Getter for <code>DB_ETERNAL.UI_FORM.HIDDEN</code>. 「hidden」- 隐藏字段专用配置
     */
    public String getHidden();

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.ROW</code>. 「rowConfig/rowClass」-
     * 行专用配置
     */
    public IUiForm setRow(String value);

    /**
     * Getter for <code>DB_ETERNAL.UI_FORM.ROW</code>. 「rowConfig/rowClass」-
     * 行专用配置
     */
    public String getRow();

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.IDENTIFIER</code>. 「identifier」-
     * 表单所属的模型ID
     */
    public IUiForm setIdentifier(String value);

    /**
     * Getter for <code>DB_ETERNAL.UI_FORM.IDENTIFIER</code>. 「identifier」-
     * 表单所属的模型ID
     */
    public String getIdentifier();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        @Override
        public default IUiForm 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::setCode,json::getString,"CODE","java.lang.String");
                setOrThrow(this::setWindow,key -> {String s = json.getString(key); return s==null?null:new java.math.BigDecimal(s);},"WINDOW","java.math.BigDecimal");
                setOrThrow(this::setColumns,json::getInteger,"COLUMNS","java.lang.Integer");
                setOrThrow(this::setHidden,json::getString,"HIDDEN","java.lang.String");
                setOrThrow(this::setRow,json::getString,"ROW","java.lang.String");
                setOrThrow(this::setIdentifier,json::getString,"IDENTIFIER","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("CODE",getCode());
                json.put("WINDOW",getWindow()==null?null:getWindow().toString());
                json.put("COLUMNS",getColumns());
                json.put("HIDDEN",getHidden());
                json.put("ROW",getRow());
                json.put("IDENTIFIER",getIdentifier());
                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;
        }

}
