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

    /**
     * Setter for <code>DB_ETERNAL.F_DEBT.KEY</code>. 「key」- 应收账单主键ID
     */
    public IFDebt setKey(String value);

    /**
     * Getter for <code>DB_ETERNAL.F_DEBT.KEY</code>. 「key」- 应收账单主键ID
     */
    public String getKey();

    /**
     * Setter for <code>DB_ETERNAL.F_DEBT.NAME</code>. 「name」 - 应收单标题
     */
    public IFDebt setName(String value);

    /**
     * Getter for <code>DB_ETERNAL.F_DEBT.NAME</code>. 「name」 - 应收单标题
     */
    public String getName();

    /**
     * Setter for <code>DB_ETERNAL.F_DEBT.CODE</code>. 「code」 - 应收单编号
     */
    public IFDebt setCode(String value);

    /**
     * Getter for <code>DB_ETERNAL.F_DEBT.CODE</code>. 「code」 - 应收单编号
     */
    public String getCode();

    /**
     * Setter for <code>DB_ETERNAL.F_DEBT.SERIAL</code>. 「serial」 - 应收单据号
     */
    public IFDebt setSerial(String value);

    /**
     * Getter for <code>DB_ETERNAL.F_DEBT.SERIAL</code>. 「serial」 - 应收单据号
     */
    public String getSerial();

    /**
     * Setter for <code>DB_ETERNAL.F_DEBT.AMOUNT</code>.
     * 「amount」——价税合计，所有明细对应的实际结算金额
     */
    public IFDebt setAmount(BigDecimal value);

    /**
     * Getter for <code>DB_ETERNAL.F_DEBT.AMOUNT</code>.
     * 「amount」——价税合计，所有明细对应的实际结算金额
     */
    public BigDecimal getAmount();

    /**
     * Setter for <code>DB_ETERNAL.F_DEBT.SIGN_NAME</code>. 「signName」签单人姓名
     */
    public IFDebt setSignName(String value);

    /**
     * Getter for <code>DB_ETERNAL.F_DEBT.SIGN_NAME</code>. 「signName」签单人姓名
     */
    public String getSignName();

    /**
     * Setter for <code>DB_ETERNAL.F_DEBT.SIGN_MOBILE</code>. 「signMobile」签单人电话
     */
    public IFDebt setSignMobile(String value);

    /**
     * Getter for <code>DB_ETERNAL.F_DEBT.SIGN_MOBILE</code>. 「signMobile」签单人电话
     */
    public String getSignMobile();

    /**
     * Setter for <code>DB_ETERNAL.F_DEBT.FINISHED</code>. 「finished」- 是否完成
     */
    public IFDebt setFinished(Boolean value);

    /**
     * Getter for <code>DB_ETERNAL.F_DEBT.FINISHED</code>. 「finished」- 是否完成
     */
    public Boolean getFinished();

    /**
     * Setter for <code>DB_ETERNAL.F_DEBT.FINISHED_AT</code>. 「createdAt」- 完成时间
     */
    public IFDebt setFinishedAt(LocalDateTime value);

    /**
     * Getter for <code>DB_ETERNAL.F_DEBT.FINISHED_AT</code>. 「createdAt」- 完成时间
     */
    public LocalDateTime getFinishedAt();

    /**
     * Setter for <code>DB_ETERNAL.F_DEBT.COMMENT</code>. 「comment」 - 备注
     */
    public IFDebt setComment(String value);

    /**
     * Getter for <code>DB_ETERNAL.F_DEBT.COMMENT</code>. 「comment」 - 备注
     */
    public String getComment();

    /**
     * Setter for <code>DB_ETERNAL.F_DEBT.CUSTOMER_ID</code>.
     * 「customerId」结算对象（单位ID）
     */
    public IFDebt setCustomerId(String value);

    /**
     * Getter for <code>DB_ETERNAL.F_DEBT.CUSTOMER_ID</code>.
     * 「customerId」结算对象（单位ID）
     */
    public String getCustomerId();

    /**
     * Setter for <code>DB_ETERNAL.F_DEBT.SETTLEMENT_ID</code>. 「settlementId」-
     * 结算单ID，该字段有值标识已经结算
     */
    public IFDebt setSettlementId(String value);

    /**
     * Getter for <code>DB_ETERNAL.F_DEBT.SETTLEMENT_ID</code>. 「settlementId」-
     * 结算单ID，该字段有值标识已经结算
     */
    public String getSettlementId();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        @Override
        public default IFDebt 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::setSerial,json::getString,"SERIAL","java.lang.String");
                setOrThrow(this::setAmount,key -> {String s = json.getString(key); return s==null?null:new java.math.BigDecimal(s);},"AMOUNT","java.math.BigDecimal");
                setOrThrow(this::setSignName,json::getString,"SIGN_NAME","java.lang.String");
                setOrThrow(this::setSignMobile,json::getString,"SIGN_MOBILE","java.lang.String");
                setOrThrow(this::setFinished,json::getBoolean,"FINISHED","java.lang.Boolean");
                setOrThrow(this::setFinishedAt,key -> {String s = json.getString(key); return s==null?null:java.time.LocalDateTime.parse(s);},"FINISHED_AT","java.time.LocalDateTime");
                setOrThrow(this::setComment,json::getString,"COMMENT","java.lang.String");
                setOrThrow(this::setCustomerId,json::getString,"CUSTOMER_ID","java.lang.String");
                setOrThrow(this::setSettlementId,json::getString,"SETTLEMENT_ID","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("CODE",getCode());
                json.put("SERIAL",getSerial());
                json.put("AMOUNT",getAmount()==null?null:getAmount().toString());
                json.put("SIGN_NAME",getSignName());
                json.put("SIGN_MOBILE",getSignMobile());
                json.put("FINISHED",getFinished());
                json.put("FINISHED_AT",getFinishedAt()==null?null:getFinishedAt().toString());
                json.put("COMMENT",getComment());
                json.put("CUSTOMER_ID",getCustomerId());
                json.put("SETTLEMENT_ID",getSettlementId());
                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;
        }

}
