/*
 * This file is generated by jOOQ.
 */
package cn.vertxup.ui.domain.tables.pojos;


import cn.vertxup.ui.domain.tables.interfaces.IUiForm;
import io.github.jklingsporn.vertx.jooq.shared.internal.VertxPojo;

import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class UiForm implements VertxPojo, IUiForm {

    private static final long serialVersionUID = 1L;

    private String key;
    private String name;
    private String code;
    private BigDecimal window;
    private Integer columns;
    private String hidden;
    private String row;
    private String identifier;
    private Boolean active;
    private String sigma;
    private String metadata;
    private String language;
    private LocalDateTime createdAt;
    private String createdBy;
    private LocalDateTime updatedAt;
    private String updatedBy;

    public UiForm() {}

    public UiForm(IUiForm value) {
        this.key = value.getKey();
        this.name = value.getName();
        this.code = value.getCode();
        this.window = value.getWindow();
        this.columns = value.getColumns();
        this.hidden = value.getHidden();
        this.row = value.getRow();
        this.identifier = value.getIdentifier();
        this.active = value.getActive();
        this.sigma = value.getSigma();
        this.metadata = value.getMetadata();
        this.language = value.getLanguage();
        this.createdAt = value.getCreatedAt();
        this.createdBy = value.getCreatedBy();
        this.updatedAt = value.getUpdatedAt();
        this.updatedBy = value.getUpdatedBy();
    }

    public UiForm(
        String key,
        String name,
        String code,
        BigDecimal window,
        Integer columns,
        String hidden,
        String row,
        String identifier,
        Boolean active,
        String sigma,
        String metadata,
        String language,
        LocalDateTime createdAt,
        String createdBy,
        LocalDateTime updatedAt,
        String updatedBy
    ) {
        this.key = key;
        this.name = name;
        this.code = code;
        this.window = window;
        this.columns = columns;
        this.hidden = hidden;
        this.row = row;
        this.identifier = identifier;
        this.active = active;
        this.sigma = sigma;
        this.metadata = metadata;
        this.language = language;
        this.createdAt = createdAt;
        this.createdBy = createdBy;
        this.updatedAt = updatedAt;
        this.updatedBy = updatedBy;
    }

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

    /**
     * Getter for <code>DB_ETERNAL.UI_FORM.KEY</code>. 「key」- 主键
     */
    @Override
    public String getKey() {
        return this.key;
    }

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.KEY</code>. 「key」- 主键
     */
    @Override
    public UiForm setKey(String key) {
        this.key = key;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.NAME</code>. 「name」- 表单名称
     */
    @Override
    public UiForm setName(String name) {
        this.name = name;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.CODE</code>. 「code」- 表单系统编码
     */
    @Override
    public UiForm setCode(String code) {
        this.code = code;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.WINDOW</code>. 「window」- window,
     * Form对应的窗口配置
     */
    @Override
    public UiForm setWindow(BigDecimal window) {
        this.window = window;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.COLUMNS</code>. 「columns」- columns,
     * Form对应的配置
     */
    @Override
    public UiForm setColumns(Integer columns) {
        this.columns = columns;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.HIDDEN</code>. 「hidden」- 隐藏字段专用配置
     */
    @Override
    public UiForm setHidden(String hidden) {
        this.hidden = hidden;
        return this;
    }

    /**
     * Getter for <code>DB_ETERNAL.UI_FORM.ROW</code>. 「rowConfig/rowClass」-
     * 行专用配置
     */
    @Override
    public String getRow() {
        return this.row;
    }

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.ROW</code>. 「rowConfig/rowClass」-
     * 行专用配置
     */
    @Override
    public UiForm setRow(String row) {
        this.row = row;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.IDENTIFIER</code>. 「identifier」-
     * 表单所属的模型ID
     */
    @Override
    public UiForm setIdentifier(String identifier) {
        this.identifier = identifier;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.ACTIVE</code>. 「active」- 是否启用
     */
    @Override
    public UiForm setActive(Boolean active) {
        this.active = active;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.SIGMA</code>. 「sigma」- 统一标识
     */
    @Override
    public UiForm setSigma(String sigma) {
        this.sigma = sigma;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.METADATA</code>. 「metadata」- 附加配置
     */
    @Override
    public UiForm setMetadata(String metadata) {
        this.metadata = metadata;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.LANGUAGE</code>. 「language」- 使用的语言
     */
    @Override
    public UiForm setLanguage(String language) {
        this.language = language;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.CREATED_AT</code>. 「createdAt」- 创建时间
     */
    @Override
    public UiForm setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.CREATED_BY</code>. 「createdBy」- 创建人
     */
    @Override
    public UiForm setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.UPDATED_AT</code>. 「updatedAt」- 更新时间
     */
    @Override
    public UiForm setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
        return this;
    }

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

    /**
     * Setter for <code>DB_ETERNAL.UI_FORM.UPDATED_BY</code>. 「updatedBy」- 更新人
     */
    @Override
    public UiForm setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
        return this;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        final UiForm other = (UiForm) obj;
        if (this.key == null) {
            if (other.key != null)
                return false;
        }
        else if (!this.key.equals(other.key))
            return false;
        if (this.name == null) {
            if (other.name != null)
                return false;
        }
        else if (!this.name.equals(other.name))
            return false;
        if (this.code == null) {
            if (other.code != null)
                return false;
        }
        else if (!this.code.equals(other.code))
            return false;
        if (this.window == null) {
            if (other.window != null)
                return false;
        }
        else if (!this.window.equals(other.window))
            return false;
        if (this.columns == null) {
            if (other.columns != null)
                return false;
        }
        else if (!this.columns.equals(other.columns))
            return false;
        if (this.hidden == null) {
            if (other.hidden != null)
                return false;
        }
        else if (!this.hidden.equals(other.hidden))
            return false;
        if (this.row == null) {
            if (other.row != null)
                return false;
        }
        else if (!this.row.equals(other.row))
            return false;
        if (this.identifier == null) {
            if (other.identifier != null)
                return false;
        }
        else if (!this.identifier.equals(other.identifier))
            return false;
        if (this.active == null) {
            if (other.active != null)
                return false;
        }
        else if (!this.active.equals(other.active))
            return false;
        if (this.sigma == null) {
            if (other.sigma != null)
                return false;
        }
        else if (!this.sigma.equals(other.sigma))
            return false;
        if (this.metadata == null) {
            if (other.metadata != null)
                return false;
        }
        else if (!this.metadata.equals(other.metadata))
            return false;
        if (this.language == null) {
            if (other.language != null)
                return false;
        }
        else if (!this.language.equals(other.language))
            return false;
        if (this.createdAt == null) {
            if (other.createdAt != null)
                return false;
        }
        else if (!this.createdAt.equals(other.createdAt))
            return false;
        if (this.createdBy == null) {
            if (other.createdBy != null)
                return false;
        }
        else if (!this.createdBy.equals(other.createdBy))
            return false;
        if (this.updatedAt == null) {
            if (other.updatedAt != null)
                return false;
        }
        else if (!this.updatedAt.equals(other.updatedAt))
            return false;
        if (this.updatedBy == null) {
            if (other.updatedBy != null)
                return false;
        }
        else if (!this.updatedBy.equals(other.updatedBy))
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((this.key == null) ? 0 : this.key.hashCode());
        result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());
        result = prime * result + ((this.code == null) ? 0 : this.code.hashCode());
        result = prime * result + ((this.window == null) ? 0 : this.window.hashCode());
        result = prime * result + ((this.columns == null) ? 0 : this.columns.hashCode());
        result = prime * result + ((this.hidden == null) ? 0 : this.hidden.hashCode());
        result = prime * result + ((this.row == null) ? 0 : this.row.hashCode());
        result = prime * result + ((this.identifier == null) ? 0 : this.identifier.hashCode());
        result = prime * result + ((this.active == null) ? 0 : this.active.hashCode());
        result = prime * result + ((this.sigma == null) ? 0 : this.sigma.hashCode());
        result = prime * result + ((this.metadata == null) ? 0 : this.metadata.hashCode());
        result = prime * result + ((this.language == null) ? 0 : this.language.hashCode());
        result = prime * result + ((this.createdAt == null) ? 0 : this.createdAt.hashCode());
        result = prime * result + ((this.createdBy == null) ? 0 : this.createdBy.hashCode());
        result = prime * result + ((this.updatedAt == null) ? 0 : this.updatedAt.hashCode());
        result = prime * result + ((this.updatedBy == null) ? 0 : this.updatedBy.hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("UiForm (");

        sb.append(key);
        sb.append(", ").append(name);
        sb.append(", ").append(code);
        sb.append(", ").append(window);
        sb.append(", ").append(columns);
        sb.append(", ").append(hidden);
        sb.append(", ").append(row);
        sb.append(", ").append(identifier);
        sb.append(", ").append(active);
        sb.append(", ").append(sigma);
        sb.append(", ").append(metadata);
        sb.append(", ").append(language);
        sb.append(", ").append(createdAt);
        sb.append(", ").append(createdBy);
        sb.append(", ").append(updatedAt);
        sb.append(", ").append(updatedBy);

        sb.append(")");
        return sb.toString();
    }

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

    @Override
    public void from(IUiForm from) {
        setKey(from.getKey());
        setName(from.getName());
        setCode(from.getCode());
        setWindow(from.getWindow());
        setColumns(from.getColumns());
        setHidden(from.getHidden());
        setRow(from.getRow());
        setIdentifier(from.getIdentifier());
        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 IUiForm> E into(E into) {
        into.from(this);
        return into;
    }
}
