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

    /**
     * Setter for <code>DB_ETERNAL.M_ACC.KEY</code>. 「key」- 增量记录ID
     */
    public IMAcc setKey(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_ACC.KEY</code>. 「key」- 增量记录ID
     */
    public String getKey();

    /**
     * Setter for <code>DB_ETERNAL.M_ACC.MODEL_ID</code>. 「modelId」-
     * 关联的模型identifier，用于描述
     */
    public IMAcc setModelId(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_ACC.MODEL_ID</code>. 「modelId」-
     * 关联的模型identifier，用于描述
     */
    public String getModelId();

    /**
     * Setter for <code>DB_ETERNAL.M_ACC.MODEL_KEY</code>. 「modelKey」-
     * 关联的模型记录ID，用于描述哪一个Model中的记录
     */
    public IMAcc setModelKey(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_ACC.MODEL_KEY</code>. 「modelKey」-
     * 关联的模型记录ID，用于描述哪一个Model中的记录
     */
    public String getModelKey();

    /**
     * Setter for <code>DB_ETERNAL.M_ACC.RECORD_JSON</code>. 「recordJson」-
     * 上一次的记录内容（Json格式）
     */
    public IMAcc setRecordJson(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_ACC.RECORD_JSON</code>. 「recordJson」-
     * 上一次的记录内容（Json格式）
     */
    public String getRecordJson();

    /**
     * Setter for <code>DB_ETERNAL.M_ACC.RECORD_RAW</code>. 「recordRaw」-
     * 上一次的记录的原始内容
     */
    public IMAcc setRecordRaw(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_ACC.RECORD_RAW</code>. 「recordRaw」-
     * 上一次的记录的原始内容
     */
    public String getRecordRaw();

    /**
     * Setter for <code>DB_ETERNAL.M_ACC.RECORD_UNIQUE</code>. 「recordUnique」-
     * 业务标识规则专用Key，可计算获取
     */
    public IMAcc setRecordUnique(String value);

    /**
     * Getter for <code>DB_ETERNAL.M_ACC.RECORD_UNIQUE</code>. 「recordUnique」-
     * 业务标识规则专用Key，可计算获取
     */
    public String getRecordUnique();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        @Override
        public default IMAcc fromJson(io.vertx.core.json.JsonObject json) {
                setOrThrow(this::setKey,json::getString,"KEY","java.lang.String");
                setOrThrow(this::setModelId,json::getString,"MODEL_ID","java.lang.String");
                setOrThrow(this::setModelKey,json::getString,"MODEL_KEY","java.lang.String");
                setOrThrow(this::setRecordJson,json::getString,"RECORD_JSON","java.lang.String");
                setOrThrow(this::setRecordRaw,json::getString,"RECORD_RAW","java.lang.String");
                setOrThrow(this::setRecordUnique,json::getString,"RECORD_UNIQUE","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("MODEL_ID",getModelId());
                json.put("MODEL_KEY",getModelKey());
                json.put("RECORD_JSON",getRecordJson());
                json.put("RECORD_RAW",getRecordRaw());
                json.put("RECORD_UNIQUE",getRecordUnique());
                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;
        }

}
