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


import cn.vertxup.atom.domain.tables.MField;
import cn.vertxup.atom.domain.tables.interfaces.IMField;
import io.github.jklingsporn.vertx.jooq.shared.internal.VertxPojo;
import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Record22;
import org.jooq.Row22;
import org.jooq.impl.UpdatableRecordImpl;

import java.time.LocalDateTime;
/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class MFieldRecord extends UpdatableRecordImpl<MFieldRecord> implements VertxPojo, Record22<String, String, String, String, String, Boolean, Boolean, Integer, Integer, String, String, String, String, String, String, String, Boolean, String, LocalDateTime, String, LocalDateTime, String>, IMField {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.KEY</code>. 「key」- 字段ID
     */
    @Override
    public MFieldRecord setKey(String value) {
        set(0, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.KEY</code>. 「key」- 字段ID
     */
    @Override
    public String getKey() {
        return (String) get(0);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.NAME</code>. 「name」- 属性名（非列）
     */
    @Override
    public MFieldRecord setName(String value) {
        set(1, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.NAME</code>. 「name」- 属性名（非列）
     */
    @Override
    public String getName() {
        return (String) get(1);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.TYPE</code>. 「type」- OX核心类型
     */
    @Override
    public MFieldRecord setType(String value) {
        set(2, value);
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.COLUMN_NAME</code>. 「columnName」-
     * 数据库列名
     */
    @Override
    public MFieldRecord setColumnName(String value) {
        set(3, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.COLUMN_NAME</code>. 「columnName」-
     * 数据库列名
     */
    @Override
    public String getColumnName() {
        return (String) get(3);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.COLUMN_TYPE</code>. 「columnType」-
     * 数据库转换过后的类型
     */
    @Override
    public MFieldRecord setColumnType(String value) {
        set(4, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.COLUMN_TYPE</code>. 「columnType」-
     * 数据库转换过后的类型
     */
    @Override
    public String getColumnType() {
        return (String) get(4);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.IS_PRIMARY</code>. 「isPrimary」- 是否为主键
     */
    @Override
    public MFieldRecord setIsPrimary(Boolean value) {
        set(5, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.IS_PRIMARY</code>. 「isPrimary」- 是否为主键
     */
    @Override
    public Boolean getIsPrimary() {
        return (Boolean) get(5);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.IS_NULLABLE</code>. 「isNullable」-
     * 是否可为空
     */
    @Override
    public MFieldRecord setIsNullable(Boolean value) {
        set(6, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.IS_NULLABLE</code>. 「isNullable」-
     * 是否可为空
     */
    @Override
    public Boolean getIsNullable() {
        return (Boolean) get(6);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.LENGTH</code>. 「length」- String类型的长度
     */
    @Override
    public MFieldRecord setLength(Integer value) {
        set(7, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.LENGTH</code>. 「length」- String类型的长度
     */
    @Override
    public Integer getLength() {
        return (Integer) get(7);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.PRECISION</code>. 「precision」-
     * Decimal类型的精度
     */
    @Override
    public MFieldRecord setPrecision(Integer value) {
        set(8, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.PRECISION</code>. 「precision」-
     * Decimal类型的精度
     */
    @Override
    public Integer getPrecision() {
        return (Integer) get(8);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.FORMAT</code>. 「format」-
     * 当前数据列的格式，String或Date类型
     */
    @Override
    public MFieldRecord setFormat(String value) {
        set(9, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.FORMAT</code>. 「format」-
     * 当前数据列的格式，String或Date类型
     */
    @Override
    public String getFormat() {
        return (String) get(9);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.IN_COMPONENT</code>. 「inComponent」-
     * 写入插件
     */
    @Override
    public MFieldRecord setInComponent(String value) {
        set(10, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.IN_COMPONENT</code>. 「inComponent」-
     * 写入插件
     */
    @Override
    public String getInComponent() {
        return (String) get(10);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.OUT_COMPONENT</code>. 「outComponent」-
     * 读取插件
     */
    @Override
    public MFieldRecord setOutComponent(String value) {
        set(11, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.OUT_COMPONENT</code>. 「outComponent」-
     * 读取插件
     */
    @Override
    public String getOutComponent() {
        return (String) get(11);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.ENTITY_ID</code>. 「entityId」- 关联的实体ID
     */
    @Override
    public MFieldRecord setEntityId(String value) {
        set(12, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.ENTITY_ID</code>. 「entityId」- 关联的实体ID
     */
    @Override
    public String getEntityId() {
        return (String) get(12);
    }

    /**
     * Setter for <code>DB_ETERNAL.M_FIELD.COMMENTS</code>. 「comments」-
     * 当前属性的描述信息
     */
    @Override
    public MFieldRecord setComments(String value) {
        set(13, value);
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.M_FIELD.COMMENTS</code>. 「comments」-
     * 当前属性的描述信息
     */
    @Override
    public String getComments() {
        return (String) get(13);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // -------------------------------------------------------------------------
    // Record22 type implementation
    // -------------------------------------------------------------------------

    @Override
    public Row22<String, String, String, String, String, Boolean, Boolean, Integer, Integer, String, String, String, String, String, String, String, Boolean, String, LocalDateTime, String, LocalDateTime, String> fieldsRow() {
        return (Row22) super.fieldsRow();
    }

    @Override
    public Row22<String, String, String, String, String, Boolean, Boolean, Integer, Integer, String, String, String, String, String, String, String, Boolean, String, LocalDateTime, String, LocalDateTime, String> valuesRow() {
        return (Row22) super.valuesRow();
    }

    @Override
    public Field<String> field1() {
        return MField.M_FIELD.KEY;
    }

    @Override
    public Field<String> field2() {
        return MField.M_FIELD.NAME;
    }

    @Override
    public Field<String> field3() {
        return MField.M_FIELD.TYPE;
    }

    @Override
    public Field<String> field4() {
        return MField.M_FIELD.COLUMN_NAME;
    }

    @Override
    public Field<String> field5() {
        return MField.M_FIELD.COLUMN_TYPE;
    }

    @Override
    public Field<Boolean> field6() {
        return MField.M_FIELD.IS_PRIMARY;
    }

    @Override
    public Field<Boolean> field7() {
        return MField.M_FIELD.IS_NULLABLE;
    }

    @Override
    public Field<Integer> field8() {
        return MField.M_FIELD.LENGTH;
    }

    @Override
    public Field<Integer> field9() {
        return MField.M_FIELD.PRECISION;
    }

    @Override
    public Field<String> field10() {
        return MField.M_FIELD.FORMAT;
    }

    @Override
    public Field<String> field11() {
        return MField.M_FIELD.IN_COMPONENT;
    }

    @Override
    public Field<String> field12() {
        return MField.M_FIELD.OUT_COMPONENT;
    }

    @Override
    public Field<String> field13() {
        return MField.M_FIELD.ENTITY_ID;
    }

    @Override
    public Field<String> field14() {
        return MField.M_FIELD.COMMENTS;
    }

    @Override
    public Field<String> field15() {
        return MField.M_FIELD.SIGMA;
    }

    @Override
    public Field<String> field16() {
        return MField.M_FIELD.LANGUAGE;
    }

    @Override
    public Field<Boolean> field17() {
        return MField.M_FIELD.ACTIVE;
    }

    @Override
    public Field<String> field18() {
        return MField.M_FIELD.METADATA;
    }

    @Override
    public Field<LocalDateTime> field19() {
        return MField.M_FIELD.CREATED_AT;
    }

    @Override
    public Field<String> field20() {
        return MField.M_FIELD.CREATED_BY;
    }

    @Override
    public Field<LocalDateTime> field21() {
        return MField.M_FIELD.UPDATED_AT;
    }

    @Override
    public Field<String> field22() {
        return MField.M_FIELD.UPDATED_BY;
    }

    @Override
    public String component1() {
        return getKey();
    }

    @Override
    public String component2() {
        return getName();
    }

    @Override
    public String component3() {
        return getType();
    }

    @Override
    public String component4() {
        return getColumnName();
    }

    @Override
    public String component5() {
        return getColumnType();
    }

    @Override
    public Boolean component6() {
        return getIsPrimary();
    }

    @Override
    public Boolean component7() {
        return getIsNullable();
    }

    @Override
    public Integer component8() {
        return getLength();
    }

    @Override
    public Integer component9() {
        return getPrecision();
    }

    @Override
    public String component10() {
        return getFormat();
    }

    @Override
    public String component11() {
        return getInComponent();
    }

    @Override
    public String component12() {
        return getOutComponent();
    }

    @Override
    public String component13() {
        return getEntityId();
    }

    @Override
    public String component14() {
        return getComments();
    }

    @Override
    public String component15() {
        return getSigma();
    }

    @Override
    public String component16() {
        return getLanguage();
    }

    @Override
    public Boolean component17() {
        return getActive();
    }

    @Override
    public String component18() {
        return getMetadata();
    }

    @Override
    public LocalDateTime component19() {
        return getCreatedAt();
    }

    @Override
    public String component20() {
        return getCreatedBy();
    }

    @Override
    public LocalDateTime component21() {
        return getUpdatedAt();
    }

    @Override
    public String component22() {
        return getUpdatedBy();
    }

    @Override
    public String value1() {
        return getKey();
    }

    @Override
    public String value2() {
        return getName();
    }

    @Override
    public String value3() {
        return getType();
    }

    @Override
    public String value4() {
        return getColumnName();
    }

    @Override
    public String value5() {
        return getColumnType();
    }

    @Override
    public Boolean value6() {
        return getIsPrimary();
    }

    @Override
    public Boolean value7() {
        return getIsNullable();
    }

    @Override
    public Integer value8() {
        return getLength();
    }

    @Override
    public Integer value9() {
        return getPrecision();
    }

    @Override
    public String value10() {
        return getFormat();
    }

    @Override
    public String value11() {
        return getInComponent();
    }

    @Override
    public String value12() {
        return getOutComponent();
    }

    @Override
    public String value13() {
        return getEntityId();
    }

    @Override
    public String value14() {
        return getComments();
    }

    @Override
    public String value15() {
        return getSigma();
    }

    @Override
    public String value16() {
        return getLanguage();
    }

    @Override
    public Boolean value17() {
        return getActive();
    }

    @Override
    public String value18() {
        return getMetadata();
    }

    @Override
    public LocalDateTime value19() {
        return getCreatedAt();
    }

    @Override
    public String value20() {
        return getCreatedBy();
    }

    @Override
    public LocalDateTime value21() {
        return getUpdatedAt();
    }

    @Override
    public String value22() {
        return getUpdatedBy();
    }

    @Override
    public MFieldRecord value1(String value) {
        setKey(value);
        return this;
    }

    @Override
    public MFieldRecord value2(String value) {
        setName(value);
        return this;
    }

    @Override
    public MFieldRecord value3(String value) {
        setType(value);
        return this;
    }

    @Override
    public MFieldRecord value4(String value) {
        setColumnName(value);
        return this;
    }

    @Override
    public MFieldRecord value5(String value) {
        setColumnType(value);
        return this;
    }

    @Override
    public MFieldRecord value6(Boolean value) {
        setIsPrimary(value);
        return this;
    }

    @Override
    public MFieldRecord value7(Boolean value) {
        setIsNullable(value);
        return this;
    }

    @Override
    public MFieldRecord value8(Integer value) {
        setLength(value);
        return this;
    }

    @Override
    public MFieldRecord value9(Integer value) {
        setPrecision(value);
        return this;
    }

    @Override
    public MFieldRecord value10(String value) {
        setFormat(value);
        return this;
    }

    @Override
    public MFieldRecord value11(String value) {
        setInComponent(value);
        return this;
    }

    @Override
    public MFieldRecord value12(String value) {
        setOutComponent(value);
        return this;
    }

    @Override
    public MFieldRecord value13(String value) {
        setEntityId(value);
        return this;
    }

    @Override
    public MFieldRecord value14(String value) {
        setComments(value);
        return this;
    }

    @Override
    public MFieldRecord value15(String value) {
        setSigma(value);
        return this;
    }

    @Override
    public MFieldRecord value16(String value) {
        setLanguage(value);
        return this;
    }

    @Override
    public MFieldRecord value17(Boolean value) {
        setActive(value);
        return this;
    }

    @Override
    public MFieldRecord value18(String value) {
        setMetadata(value);
        return this;
    }

    @Override
    public MFieldRecord value19(LocalDateTime value) {
        setCreatedAt(value);
        return this;
    }

    @Override
    public MFieldRecord value20(String value) {
        setCreatedBy(value);
        return this;
    }

    @Override
    public MFieldRecord value21(LocalDateTime value) {
        setUpdatedAt(value);
        return this;
    }

    @Override
    public MFieldRecord value22(String value) {
        setUpdatedBy(value);
        return this;
    }

    @Override
    public MFieldRecord values(String value1, String value2, String value3, String value4, String value5, Boolean value6, Boolean value7, Integer value8, Integer value9, String value10, String value11, String value12, String value13, String value14, String value15, String value16, Boolean value17, String value18, LocalDateTime value19, String value20, LocalDateTime value21, String value22) {
        value1(value1);
        value2(value2);
        value3(value3);
        value4(value4);
        value5(value5);
        value6(value6);
        value7(value7);
        value8(value8);
        value9(value9);
        value10(value10);
        value11(value11);
        value12(value12);
        value13(value13);
        value14(value14);
        value15(value15);
        value16(value16);
        value17(value17);
        value18(value18);
        value19(value19);
        value20(value20);
        value21(value21);
        value22(value22);
        return this;
    }

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

    @Override
    public void from(IMField from) {
        setKey(from.getKey());
        setName(from.getName());
        setType(from.getType());
        setColumnName(from.getColumnName());
        setColumnType(from.getColumnType());
        setIsPrimary(from.getIsPrimary());
        setIsNullable(from.getIsNullable());
        setLength(from.getLength());
        setPrecision(from.getPrecision());
        setFormat(from.getFormat());
        setInComponent(from.getInComponent());
        setOutComponent(from.getOutComponent());
        setEntityId(from.getEntityId());
        setComments(from.getComments());
        setSigma(from.getSigma());
        setLanguage(from.getLanguage());
        setActive(from.getActive());
        setMetadata(from.getMetadata());
        setCreatedAt(from.getCreatedAt());
        setCreatedBy(from.getCreatedBy());
        setUpdatedAt(from.getUpdatedAt());
        setUpdatedBy(from.getUpdatedBy());
    }

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

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

    /**
     * Create a detached MFieldRecord
     */
    public MFieldRecord() {
        super(MField.M_FIELD);
    }

    /**
     * Create a detached, initialised MFieldRecord
     */
    public MFieldRecord(String key, String name, String type, String columnName, String columnType, Boolean isPrimary, Boolean isNullable, Integer length, Integer precision, String format, String inComponent, String outComponent, String entityId, String comments, String sigma, String language, Boolean active, String metadata, LocalDateTime createdAt, String createdBy, LocalDateTime updatedAt, String updatedBy) {
        super(MField.M_FIELD);

        setKey(key);
        setName(name);
        setType(type);
        setColumnName(columnName);
        setColumnType(columnType);
        setIsPrimary(isPrimary);
        setIsNullable(isNullable);
        setLength(length);
        setPrecision(precision);
        setFormat(format);
        setInComponent(inComponent);
        setOutComponent(outComponent);
        setEntityId(entityId);
        setComments(comments);
        setSigma(sigma);
        setLanguage(language);
        setActive(active);
        setMetadata(metadata);
        setCreatedAt(createdAt);
        setCreatedBy(createdBy);
        setUpdatedAt(updatedAt);
        setUpdatedBy(updatedBy);
    }

    /**
     * Create a detached, initialised MFieldRecord
     */
    public MFieldRecord(cn.vertxup.atom.domain.tables.pojos.MField value) {
        super(MField.M_FIELD);

        if (value != null) {
            setKey(value.getKey());
            setName(value.getName());
            setType(value.getType());
            setColumnName(value.getColumnName());
            setColumnType(value.getColumnType());
            setIsPrimary(value.getIsPrimary());
            setIsNullable(value.getIsNullable());
            setLength(value.getLength());
            setPrecision(value.getPrecision());
            setFormat(value.getFormat());
            setInComponent(value.getInComponent());
            setOutComponent(value.getOutComponent());
            setEntityId(value.getEntityId());
            setComments(value.getComments());
            setSigma(value.getSigma());
            setLanguage(value.getLanguage());
            setActive(value.getActive());
            setMetadata(value.getMetadata());
            setCreatedAt(value.getCreatedAt());
            setCreatedBy(value.getCreatedBy());
            setUpdatedAt(value.getUpdatedAt());
            setUpdatedBy(value.getUpdatedBy());
        }
    }

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