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


import cn.vertxup.lbs.domain.Db;
import cn.vertxup.lbs.domain.Keys;
import cn.vertxup.lbs.domain.tables.records.LRegionRecord;
import org.jooq.Record;
import org.jooq.*;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;

import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({"all", "unchecked", "rawtypes"})
public class LRegion extends TableImpl<LRegionRecord> {

    /**
     * The reference instance of <code>DB_ETERNAL.L_REGION</code>
     */
    public static final LRegion L_REGION = new LRegion();
    private static final long serialVersionUID = 1L;
    /**
     * The column <code>DB_ETERNAL.L_REGION.KEY</code>. 「key」- 主键
     */
    public final TableField<LRegionRecord, String> KEY = createField(DSL.name("KEY"), SQLDataType.VARCHAR(36).nullable(false), this, "「key」- 主键");
    /**
     * The column <code>DB_ETERNAL.L_REGION.NAME</code>. 「name」- 名称
     */
    public final TableField<LRegionRecord, String> NAME = createField(DSL.name("NAME"), SQLDataType.VARCHAR(32).nullable(false), this, "「name」- 名称");
    /**
     * The column <code>DB_ETERNAL.L_REGION.CODE</code>. 「code」- 编码
     */
    public final TableField<LRegionRecord, String> CODE = createField(DSL.name("CODE"), SQLDataType.VARCHAR(36), this, "「code」- 编码");
    /**
     * The column <code>DB_ETERNAL.L_REGION.METADATA</code>. 「metadata」- 附加配置
     */
    public final TableField<LRegionRecord, String> METADATA = createField(DSL.name("METADATA"), SQLDataType.CLOB, this, "「metadata」- 附加配置");
    /**
     * The column <code>DB_ETERNAL.L_REGION.ORDER</code>. 「order」- 排序
     */
    public final TableField<LRegionRecord, Integer> ORDER = createField(DSL.name("ORDER"), SQLDataType.INTEGER, this, "「order」- 排序");
    /**
     * The column <code>DB_ETERNAL.L_REGION.CITY_ID</code>. 「cityId」- 城市ID
     */
    public final TableField<LRegionRecord, String> CITY_ID = createField(DSL.name("CITY_ID"), SQLDataType.VARCHAR(36).nullable(false), this, "「cityId」- 城市ID");
    /**
     * The column <code>DB_ETERNAL.L_REGION.ACTIVE</code>. 「active」- 是否启用
     */
    public final TableField<LRegionRecord, Boolean> ACTIVE = createField(DSL.name("ACTIVE"), SQLDataType.BIT, this, "「active」- 是否启用");
    /**
     * The column <code>DB_ETERNAL.L_REGION.SIGMA</code>. 「sigma」- 统一标识
     */
    public final TableField<LRegionRecord, String> SIGMA = createField(DSL.name("SIGMA"), SQLDataType.VARCHAR(32), this, "「sigma」- 统一标识");
    /**
     * The column <code>DB_ETERNAL.L_REGION.LANGUAGE</code>. 「language」- 使用的语言
     */
    public final TableField<LRegionRecord, String> LANGUAGE = createField(DSL.name("LANGUAGE"), SQLDataType.VARCHAR(8), this, "「language」- 使用的语言");
    /**
     * The column <code>DB_ETERNAL.L_REGION.CREATED_AT</code>. 「createdAt」- 创建时间
     */
    public final TableField<LRegionRecord, LocalDateTime> CREATED_AT = createField(DSL.name("CREATED_AT"), SQLDataType.LOCALDATETIME(0), this, "「createdAt」- 创建时间");
    /**
     * The column <code>DB_ETERNAL.L_REGION.CREATED_BY</code>. 「createdBy」- 创建人
     */
    public final TableField<LRegionRecord, String> CREATED_BY = createField(DSL.name("CREATED_BY"), SQLDataType.VARCHAR(36), this, "「createdBy」- 创建人");
    /**
     * The column <code>DB_ETERNAL.L_REGION.UPDATED_AT</code>. 「updatedAt」- 更新时间
     */
    public final TableField<LRegionRecord, LocalDateTime> UPDATED_AT = createField(DSL.name("UPDATED_AT"), SQLDataType.LOCALDATETIME(0), this, "「updatedAt」- 更新时间");
    /**
     * The column <code>DB_ETERNAL.L_REGION.UPDATED_BY</code>. 「updatedBy」- 更新人
     */
    public final TableField<LRegionRecord, String> UPDATED_BY = createField(DSL.name("UPDATED_BY"), SQLDataType.VARCHAR(36), this, "「updatedBy」- 更新人");

    private LRegion(Name alias, Table<LRegionRecord> aliased) {
        this(alias, aliased, null);
    }

    private LRegion(Name alias, Table<LRegionRecord> aliased, Field<?>[] parameters) {
        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
    }

    /**
     * Create an aliased <code>DB_ETERNAL.L_REGION</code> table reference
     */
    public LRegion(String alias) {
        this(DSL.name(alias), L_REGION);
    }

    /**
     * Create an aliased <code>DB_ETERNAL.L_REGION</code> table reference
     */
    public LRegion(Name alias) {
        this(alias, L_REGION);
    }

    /**
     * Create a <code>DB_ETERNAL.L_REGION</code> table reference
     */
    public LRegion() {
        this(DSL.name("L_REGION"), null);
    }

    public <O extends Record> LRegion(Table<O> child, ForeignKey<O, LRegionRecord> key) {
        super(child, key, L_REGION);
    }

    /**
     * The class holding records for this type
     */
    @Override
    public Class<LRegionRecord> getRecordType() {
        return LRegionRecord.class;
    }

    @Override
    public Schema getSchema() {
        return aliased() ? null : Db.DB_ETERNAL;
    }

    @Override
    public UniqueKey<LRegionRecord> getPrimaryKey() {
        return Keys.KEY_L_REGION_PRIMARY;
    }

    @Override
    public List<UniqueKey<LRegionRecord>> getUniqueKeys() {
        return Arrays.asList(Keys.KEY_L_REGION_CODE);
    }

    @Override
    public LRegion as(String alias) {
        return new LRegion(DSL.name(alias), this);
    }

    @Override
    public LRegion as(Name alias) {
        return new LRegion(alias, this);
    }

    /**
     * Rename this table
     */
    @Override
    public LRegion rename(String name) {
        return new LRegion(DSL.name(name), null);
    }

    /**
     * Rename this table
     */
    @Override
    public LRegion rename(Name name) {
        return new LRegion(name, null);
    }

    // -------------------------------------------------------------------------
    // Row13 type methods
    // -------------------------------------------------------------------------

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