/*
 * This file is generated by jOOQ.
 */
package ervu_dashboard.ervu_dashboard.db_beans.ratings.tables;


import ervu_dashboard.ervu_dashboard.db_beans.ervu_dashboard.tables.Recruitment.RecruitmentPath;
import ervu_dashboard.ervu_dashboard.db_beans.ratings.Keys;
import ervu_dashboard.ervu_dashboard.db_beans.ratings.Ratings;
import ervu_dashboard.ervu_dashboard.db_beans.ratings.tables.records.ConscriptionInfoRecord;
import ervu_dashboard.ervu_dashboard.db_beans.space.tables.Region.RegionPath;

import java.math.BigDecimal;
import java.sql.Date;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
import org.jooq.Record;
import org.jooq.SQL;
import org.jooq.Schema;
import org.jooq.Select;
import org.jooq.Stringly;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;


/**
 * Призыв уровень РФ
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ConscriptionInfo extends TableImpl<ConscriptionInfoRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ratings.conscription_info</code>
     */
    public static final ConscriptionInfo CONSCRIPTION_INFO = new ConscriptionInfo();

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

    /**
     * The column <code>ratings.conscription_info.conscription_info_id</code>.
     */
    public final TableField<ConscriptionInfoRecord, Long> CONSCRIPTION_INFO_ID = createField(DSL.name("conscription_info_id"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("nextval('ratings.\"ratings.conscription_info_id_ratings.conscription_info_seq\"'::regclass)"), SQLDataType.BIGINT)), this, "");

    /**
     * The column <code>ratings.conscription_info.id_region</code>.
     */
    public final TableField<ConscriptionInfoRecord, Integer> ID_REGION = createField(DSL.name("id_region"), SQLDataType.INTEGER, this, "");

    /**
     * The column <code>ratings.conscription_info.execution</code>. Исполнение
     * плана призыва
     */
    public final TableField<ConscriptionInfoRecord, BigDecimal> EXECUTION = createField(DSL.name("execution"), SQLDataType.NUMERIC, this, "Исполнение плана призыва");

    /**
     * The column <code>ratings.conscription_info.spring_autumn</code>.
     * Осень/весна
     */
    public final TableField<ConscriptionInfoRecord, String> SPRING_AUTUMN = createField(DSL.name("spring_autumn"), SQLDataType.CLOB, this, "Осень/весна");

    /**
     * The column <code>ratings.conscription_info.recording_date</code>. Дата
     * записи
     */
    public final TableField<ConscriptionInfoRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE, this, "Дата записи");

    /**
     * The column <code>ratings.conscription_info.execution_percent</code>.
     * Исолнение плана призыва в процентах
     */
    public final TableField<ConscriptionInfoRecord, BigDecimal> EXECUTION_PERCENT = createField(DSL.name("execution_percent"), SQLDataType.NUMERIC, this, "Исолнение плана призыва в процентах");

    /**
     * The column <code>ratings.conscription_info.recruitment_id</code>.
     */
    public final TableField<ConscriptionInfoRecord, String> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.CHAR(36), this, "");

    private ConscriptionInfo(Name alias, Table<ConscriptionInfoRecord> aliased) {
        this(alias, aliased, (Field<?>[]) null, null);
    }

    private ConscriptionInfo(Name alias, Table<ConscriptionInfoRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Призыв уровень РФ"), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>ratings.conscription_info</code> table reference
     */
    public ConscriptionInfo(String alias) {
        this(DSL.name(alias), CONSCRIPTION_INFO);
    }

    /**
     * Create an aliased <code>ratings.conscription_info</code> table reference
     */
    public ConscriptionInfo(Name alias) {
        this(alias, CONSCRIPTION_INFO);
    }

    /**
     * Create a <code>ratings.conscription_info</code> table reference
     */
    public ConscriptionInfo() {
        this(DSL.name("conscription_info"), null);
    }

    public <O extends Record> ConscriptionInfo(Table<O> path, ForeignKey<O, ConscriptionInfoRecord> childPath, InverseForeignKey<O, ConscriptionInfoRecord> parentPath) {
        super(path, childPath, parentPath, CONSCRIPTION_INFO);
    }

    /**
     * A subtype implementing {@link Path} for simplified path-based joins.
     */
    public static class ConscriptionInfoPath extends ConscriptionInfo implements Path<ConscriptionInfoRecord> {
        public <O extends Record> ConscriptionInfoPath(Table<O> path, ForeignKey<O, ConscriptionInfoRecord> childPath, InverseForeignKey<O, ConscriptionInfoRecord> parentPath) {
            super(path, childPath, parentPath);
        }
        private ConscriptionInfoPath(Name alias, Table<ConscriptionInfoRecord> aliased) {
            super(alias, aliased);
        }

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

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

        @Override
        public ConscriptionInfoPath as(Table<?> alias) {
            return new ConscriptionInfoPath(alias.getQualifiedName(), this);
        }
    }

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

    @Override
    public UniqueKey<ConscriptionInfoRecord> getPrimaryKey() {
        return Keys.PK_CONSCRIPTION_INFO;
    }

    @Override
    public List<ForeignKey<ConscriptionInfoRecord, ?>> getReferences() {
        return Arrays.asList(Keys.CONSCRIPTION_INFO__CONSCRIPTION_INFO_FK2, Keys.CONSCRIPTION_INFO__CONSCRIPTION_INFO_FK1);
    }

    private transient RegionPath _region;

    /**
     * Get the implicit join path to the <code>space.region</code> table.
     */
    public RegionPath region() {
        if (_region == null)
            _region = new RegionPath(this, Keys.CONSCRIPTION_INFO__CONSCRIPTION_INFO_FK2, null);

        return _region;
    }

    private transient RecruitmentPath _recruitment;

    /**
     * Get the implicit join path to the <code>ervu_dashboard.recruitment</code>
     * table.
     */
    public RecruitmentPath recruitment() {
        if (_recruitment == null)
            _recruitment = new RecruitmentPath(this, Keys.CONSCRIPTION_INFO__CONSCRIPTION_INFO_FK1, null);

        return _recruitment;
    }

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

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

    @Override
    public ConscriptionInfo as(Table<?> alias) {
        return new ConscriptionInfo(alias.getQualifiedName(), this);
    }

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

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

    /**
     * Rename this table
     */
    @Override
    public ConscriptionInfo rename(Table<?> name) {
        return new ConscriptionInfo(name.getQualifiedName(), null);
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public ConscriptionInfo where(Condition condition) {
        return new ConscriptionInfo(getQualifiedName(), aliased() ? this : null, null, condition);
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public ConscriptionInfo where(Collection<? extends Condition> conditions) {
        return where(DSL.and(conditions));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public ConscriptionInfo where(Condition... conditions) {
        return where(DSL.and(conditions));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public ConscriptionInfo where(Field<Boolean> condition) {
        return where(DSL.condition(condition));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public ConscriptionInfo where(SQL condition) {
        return where(DSL.condition(condition));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public ConscriptionInfo where(@Stringly.SQL String condition) {
        return where(DSL.condition(condition));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public ConscriptionInfo where(@Stringly.SQL String condition, Object... binds) {
        return where(DSL.condition(condition, binds));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    @PlainSQL
    public ConscriptionInfo where(@Stringly.SQL String condition, QueryPart... parts) {
        return where(DSL.condition(condition, parts));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public ConscriptionInfo whereExists(Select<?> select) {
        return where(DSL.exists(select));
    }

    /**
     * Create an inline derived table from this table
     */
    @Override
    public ConscriptionInfo whereNotExists(Select<?> select) {
        return where(DSL.notExists(select));
    }
}
