/*
 * This file is generated by jOOQ.
 */
package cn.vertxup.psi.domain.tables.records;


import cn.vertxup.psi.domain.tables.POutTicket;
import cn.vertxup.psi.domain.tables.interfaces.IPOutTicket;
import io.github.jklingsporn.vertx.jooq.shared.internal.VertxPojo;
import org.jooq.Record1;
import org.jooq.impl.UpdatableRecordImpl;

import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class POutTicketRecord extends UpdatableRecordImpl<POutTicketRecord> implements VertxPojo, IPOutTicket {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.KEY</code>. 「key」- 出库单主键
     */
    @Override
    public POutTicketRecord setKey(String value) {
        set(0, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.KEY</code>. 「key」- 出库单主键
     */
    @Override
    public String getKey() {
        return (String) get(0);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.SERIAL</code>. 「serial」-
     * 出库单号（系统可用，直接计算）
     */
    @Override
    public POutTicketRecord setSerial(String value) {
        set(1, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.SERIAL</code>. 「serial」-
     * 出库单号（系统可用，直接计算）
     */
    @Override
    public String getSerial() {
        return (String) get(1);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.TYPE</code>. 「type」- 单据类型
     */
    @Override
    public POutTicketRecord setType(String value) {
        set(2, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.TYPE</code>. 「type」- 单据类型
     */
    @Override
    public String getType() {
        return (String) get(2);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.TYPE_BUSINESS</code>.
     * 「typeBusiness」- 业务类型
     */
    @Override
    public POutTicketRecord setTypeBusiness(String value) {
        set(3, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.TYPE_BUSINESS</code>.
     * 「typeBusiness」- 业务类型
     */
    @Override
    public String getTypeBusiness() {
        return (String) get(3);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.STATUS</code>. 「status」- 订单状态
     */
    @Override
    public POutTicketRecord setStatus(String value) {
        set(4, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.STATUS</code>. 「status」- 订单状态
     */
    @Override
    public String getStatus() {
        return (String) get(4);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.WH_ID</code>. 「whId」- 出库仓库
     */
    @Override
    public POutTicketRecord setWhId(String value) {
        set(5, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.WH_ID</code>. 「whId」- 出库仓库
     */
    @Override
    public String getWhId() {
        return (String) get(5);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.CUSTOMER_ID</code>.
     * 「customerId」- 客户ID
     */
    @Override
    public POutTicketRecord setCustomerId(String value) {
        set(6, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.CUSTOMER_ID</code>.
     * 「customerId」- 客户ID
     */
    @Override
    public String getCustomerId() {
        return (String) get(6);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.CUSTOMER_INFO</code>.
     * 「customerInfo」- 客户联系信息
     */
    @Override
    public POutTicketRecord setCustomerInfo(String value) {
        set(7, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.CUSTOMER_INFO</code>.
     * 「customerInfo」- 客户联系信息
     */
    @Override
    public String getCustomerInfo() {
        return (String) get(7);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.OP_AT</code>. 「opAt」- 单据日期
     */
    @Override
    public POutTicketRecord setOpAt(LocalDateTime value) {
        set(8, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.OP_AT</code>. 「opAt」- 单据日期
     */
    @Override
    public LocalDateTime getOpAt() {
        return (LocalDateTime) get(8);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.OP_BY</code>. 「opBy」- 业务员
     */
    @Override
    public POutTicketRecord setOpBy(String value) {
        set(9, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.OP_BY</code>. 「opBy」- 业务员
     */
    @Override
    public String getOpBy() {
        return (String) get(9);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.OP_DEPT</code>. 「opDept」- 业务部门
     */
    @Override
    public POutTicketRecord setOpDept(String value) {
        set(10, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.OP_DEPT</code>. 「opDept」- 业务部门
     */
    @Override
    public String getOpDept() {
        return (String) get(10);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.TAGS</code>. 「tags」- 单据标签
     */
    @Override
    public POutTicketRecord setTags(String value) {
        set(11, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.TAGS</code>. 「tags」- 单据标签
     */
    @Override
    public String getTags() {
        return (String) get(11);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.COMMENT</code>. 「comment」- 单据备注
     */
    @Override
    public POutTicketRecord setComment(String value) {
        set(12, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.COMMENT</code>. 「comment」- 单据备注
     */
    @Override
    public String getComment() {
        return (String) get(12);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.AMOUNT</code>. 「amount」- 出库单总额
     */
    @Override
    public POutTicketRecord setAmount(BigDecimal value) {
        set(13, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.AMOUNT</code>. 「amount」- 出库单总额
     */
    @Override
    public BigDecimal getAmount() {
        return (BigDecimal) get(13);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.APPROVED_BY</code>.
     * 「approvedBy」- 审核人
     */
    @Override
    public POutTicketRecord setApprovedBy(String value) {
        set(14, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.APPROVED_BY</code>.
     * 「approvedBy」- 审核人
     */
    @Override
    public String getApprovedBy() {
        return (String) get(14);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.APPROVED_AT</code>.
     * 「approvedAt」- 审核时间
     */
    @Override
    public POutTicketRecord setApprovedAt(LocalDateTime value) {
        set(15, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.APPROVED_AT</code>.
     * 「approvedAt」- 审核时间
     */
    @Override
    public LocalDateTime getApprovedAt() {
        return (LocalDateTime) get(15);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.TO_ID</code>. 「toId」- 收货地址ID
     */
    @Override
    public POutTicketRecord setToId(String value) {
        set(16, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.TO_ID</code>. 「toId」- 收货地址ID
     */
    @Override
    public String getToId() {
        return (String) get(16);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.TO_ADDRESS</code>. 「toAddress」-
     * 收货地址
     */
    @Override
    public POutTicketRecord setToAddress(String value) {
        set(17, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.TO_ADDRESS</code>. 「toAddress」-
     * 收货地址
     */
    @Override
    public String getToAddress() {
        return (String) get(17);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.CURRENCY_ID</code>.
     * 「currencyId」- 币种
     */
    @Override
    public POutTicketRecord setCurrencyId(String value) {
        set(18, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.CURRENCY_ID</code>.
     * 「currencyId」- 币种
     */
    @Override
    public String getCurrencyId() {
        return (String) get(18);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.COMPANY_ID</code>. 「companyId」-
     * 所属公司
     */
    @Override
    public POutTicketRecord setCompanyId(String value) {
        set(19, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.COMPANY_ID</code>. 「companyId」-
     * 所属公司
     */
    @Override
    public String getCompanyId() {
        return (String) get(19);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.ACTIVE</code>. 「active」- 是否启用
     */
    @Override
    public POutTicketRecord setActive(Boolean value) {
        set(20, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.ACTIVE</code>. 「active」- 是否启用
     */
    @Override
    public Boolean getActive() {
        return (Boolean) get(20);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.SIGMA</code>. 「sigma」- 统一标识
     */
    @Override
    public POutTicketRecord setSigma(String value) {
        set(21, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.SIGMA</code>. 「sigma」- 统一标识
     */
    @Override
    public String getSigma() {
        return (String) get(21);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.METADATA</code>. 「metadata」-
     * 附加配置
     */
    @Override
    public POutTicketRecord setMetadata(String value) {
        set(22, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.METADATA</code>. 「metadata」-
     * 附加配置
     */
    @Override
    public String getMetadata() {
        return (String) get(22);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.LANGUAGE</code>. 「language」-
     * 使用的语言
     */
    @Override
    public POutTicketRecord setLanguage(String value) {
        set(23, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.LANGUAGE</code>. 「language」-
     * 使用的语言
     */
    @Override
    public String getLanguage() {
        return (String) get(23);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.CREATED_AT</code>. 「createdAt」-
     * 创建时间
     */
    @Override
    public POutTicketRecord setCreatedAt(LocalDateTime value) {
        set(24, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.CREATED_AT</code>. 「createdAt」-
     * 创建时间
     */
    @Override
    public LocalDateTime getCreatedAt() {
        return (LocalDateTime) get(24);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.CREATED_BY</code>. 「createdBy」-
     * 创建人
     */
    @Override
    public POutTicketRecord setCreatedBy(String value) {
        set(25, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.CREATED_BY</code>. 「createdBy」-
     * 创建人
     */
    @Override
    public String getCreatedBy() {
        return (String) get(25);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.UPDATED_AT</code>. 「updatedAt」-
     * 更新时间
     */
    @Override
    public POutTicketRecord setUpdatedAt(LocalDateTime value) {
        set(26, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.UPDATED_AT</code>. 「updatedAt」-
     * 更新时间
     */
    @Override
    public LocalDateTime getUpdatedAt() {
        return (LocalDateTime) get(26);
    }

    /**
     * Setter for <code>DB_ETERNAL.P_OUT_TICKET.UPDATED_BY</code>. 「updatedBy」-
     * 更新人
     */
    @Override
    public POutTicketRecord setUpdatedBy(String value) {
        set(27, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.P_OUT_TICKET.UPDATED_BY</code>. 「updatedBy」-
     * 更新人
     */
    @Override
    public String getUpdatedBy() {
        return (String) get(27);
    }

    // -------------------------------------------------------------------------
    // Primary key information
    // -------------------------------------------------------------------------

    @Override
    public Record1<String> key() {
        return (Record1) super.key();
    }

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

    @Override
    public void from(IPOutTicket from) {
        setKey(from.getKey());
        setSerial(from.getSerial());
        setType(from.getType());
        setTypeBusiness(from.getTypeBusiness());
        setStatus(from.getStatus());
        setWhId(from.getWhId());
        setCustomerId(from.getCustomerId());
        setCustomerInfo(from.getCustomerInfo());
        setOpAt(from.getOpAt());
        setOpBy(from.getOpBy());
        setOpDept(from.getOpDept());
        setTags(from.getTags());
        setComment(from.getComment());
        setAmount(from.getAmount());
        setApprovedBy(from.getApprovedBy());
        setApprovedAt(from.getApprovedAt());
        setToId(from.getToId());
        setToAddress(from.getToAddress());
        setCurrencyId(from.getCurrencyId());
        setCompanyId(from.getCompanyId());
        setActive(from.getActive());
        setSigma(from.getSigma());
        setMetadata(from.getMetadata());
        setLanguage(from.getLanguage());
        setCreatedAt(from.getCreatedAt());
        setCreatedBy(from.getCreatedBy());
        setUpdatedAt(from.getUpdatedAt());
        setUpdatedBy(from.getUpdatedBy());
    }

    @Override
    public <E extends IPOutTicket> E into(E into) {
        into.from(this);
        return into;
    }

    // -------------------------------------------------------------------------
    // Constructors
    // -------------------------------------------------------------------------

    /**
     * Create a detached POutTicketRecord
     */
    public POutTicketRecord() {
        super(POutTicket.P_OUT_TICKET);
    }

    /**
     * Create a detached, initialised POutTicketRecord
     */
    public POutTicketRecord(String key, String serial, String type, String typeBusiness, String status, String whId, String customerId, String customerInfo, LocalDateTime opAt, String opBy, String opDept, String tags, String comment, BigDecimal amount, String approvedBy, LocalDateTime approvedAt, String toId, String toAddress, String currencyId, String companyId, Boolean active, String sigma, String metadata, String language, LocalDateTime createdAt, String createdBy, LocalDateTime updatedAt, String updatedBy) {
        super(POutTicket.P_OUT_TICKET);

        setKey(key);
        setSerial(serial);
        setType(type);
        setTypeBusiness(typeBusiness);
        setStatus(status);
        setWhId(whId);
        setCustomerId(customerId);
        setCustomerInfo(customerInfo);
        setOpAt(opAt);
        setOpBy(opBy);
        setOpDept(opDept);
        setTags(tags);
        setComment(comment);
        setAmount(amount);
        setApprovedBy(approvedBy);
        setApprovedAt(approvedAt);
        setToId(toId);
        setToAddress(toAddress);
        setCurrencyId(currencyId);
        setCompanyId(companyId);
        setActive(active);
        setSigma(sigma);
        setMetadata(metadata);
        setLanguage(language);
        setCreatedAt(createdAt);
        setCreatedBy(createdBy);
        setUpdatedAt(updatedAt);
        setUpdatedBy(updatedBy);
    }

    /**
     * Create a detached, initialised POutTicketRecord
     */
    public POutTicketRecord(cn.vertxup.psi.domain.tables.pojos.POutTicket value) {
        super(POutTicket.P_OUT_TICKET);

        if (value != null) {
            setKey(value.getKey());
            setSerial(value.getSerial());
            setType(value.getType());
            setTypeBusiness(value.getTypeBusiness());
            setStatus(value.getStatus());
            setWhId(value.getWhId());
            setCustomerId(value.getCustomerId());
            setCustomerInfo(value.getCustomerInfo());
            setOpAt(value.getOpAt());
            setOpBy(value.getOpBy());
            setOpDept(value.getOpDept());
            setTags(value.getTags());
            setComment(value.getComment());
            setAmount(value.getAmount());
            setApprovedBy(value.getApprovedBy());
            setApprovedAt(value.getApprovedAt());
            setToId(value.getToId());
            setToAddress(value.getToAddress());
            setCurrencyId(value.getCurrencyId());
            setCompanyId(value.getCompanyId());
            setActive(value.getActive());
            setSigma(value.getSigma());
            setMetadata(value.getMetadata());
            setLanguage(value.getLanguage());
            setCreatedAt(value.getCreatedAt());
            setCreatedBy(value.getCreatedBy());
            setUpdatedAt(value.getUpdatedAt());
            setUpdatedBy(value.getUpdatedBy());
        }
    }

        public POutTicketRecord(io.vertx.core.json.JsonObject json) {
                this();
                fromJson(json);
        }
}
