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


import ervu_dashboard.ervu_dashboard.db_beans.main_dashboard.Keys;
import ervu_dashboard.ervu_dashboard.db_beans.main_dashboard.MainDashboard;
import ervu_dashboard.ervu_dashboard.db_beans.main_dashboard.tables.records.TotalRegisteredRecord;
import ervu_dashboard.ervu_dashboard.db_beans.public_.tables.PubRecruitment.PubRecruitmentPath;

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

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Identity;
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 TotalRegistered extends TableImpl<TotalRegisteredRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>main_dashboard.total_registered</code>
     */
    public static final TotalRegistered TOTAL_REGISTERED = new TotalRegistered();

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

    /**
     * The column
     * <code>main_dashboard.total_registered.id_total_registered</code>.
     */
    public final TableField<TotalRegisteredRecord, Long> ID_TOTAL_REGISTERED = createField(DSL.name("id_total_registered"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>main_dashboard.total_registered.total_registered</code>.
     * Всего состоят на учете
     */
    public final TableField<TotalRegisteredRecord, BigDecimal> TOTAL_REGISTERED_ = createField(DSL.name("total_registered"), SQLDataType.NUMERIC, this, "Всего состоят на учете");

    /**
     * The column
     * <code>main_dashboard.total_registered.total_registered_M</code>. Всего на
     * учете мужчин
     */
    public final TableField<TotalRegisteredRecord, BigDecimal> TOTAL_REGISTERED_M = createField(DSL.name("total_registered_M"), SQLDataType.NUMERIC, this, "Всего на учете мужчин");

    /**
     * The column
     * <code>main_dashboard.total_registered.total_registered_W</code>. Всего на
     * учете женщин
     */
    public final TableField<TotalRegisteredRecord, BigDecimal> TOTAL_REGISTERED_W = createField(DSL.name("total_registered_W"), SQLDataType.NUMERIC, this, "Всего на учете женщин");

    /**
     * The column
     * <code>main_dashboard.total_registered.mobilization_criterion</code>.
     * Количество подходящих под критерии мобилизации
     */
    public final TableField<TotalRegisteredRecord, BigDecimal> MOBILIZATION_CRITERION = createField(DSL.name("mobilization_criterion"), SQLDataType.NUMERIC, this, "Количество подходящих под критерии мобилизации");

    /**
     * The column
     * <code>main_dashboard.total_registered.volunteer_criterion</code>.
     * Количество подходящих под критерии добровольной службы
     */
    public final TableField<TotalRegisteredRecord, BigDecimal> VOLUNTEER_CRITERION = createField(DSL.name("volunteer_criterion"), SQLDataType.NUMERIC, this, "Количество подходящих под критерии добровольной службы");

    /**
     * The column
     * <code>main_dashboard.total_registered.contract_criterion</code>.
     * Количество подходящих под критерии контрактной службы
     */
    public final TableField<TotalRegisteredRecord, BigDecimal> CONTRACT_CRITERION = createField(DSL.name("contract_criterion"), SQLDataType.NUMERIC, this, "Количество подходящих под критерии контрактной службы");

    /**
     * The column <code>main_dashboard.total_registered.recording_date</code>.
     * дата записи
     */
    public final TableField<TotalRegisteredRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE.defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.DATE)), this, "дата записи");

    /**
     * The column
     * <code>main_dashboard.total_registered.mobilization_criterion_percent</code>.
     * Процент подходящих под критерии мобилизации
     */
    public final TableField<TotalRegisteredRecord, BigDecimal> MOBILIZATION_CRITERION_PERCENT = createField(DSL.name("mobilization_criterion_percent"), SQLDataType.NUMERIC, this, "Процент подходящих под критерии мобилизации");

    /**
     * The column
     * <code>main_dashboard.total_registered.volunteer_criterion_percent</code>.
     * Процент подходящих под критерии добровольной службы
     */
    public final TableField<TotalRegisteredRecord, BigDecimal> VOLUNTEER_CRITERION_PERCENT = createField(DSL.name("volunteer_criterion_percent"), SQLDataType.NUMERIC, this, "Процент подходящих под критерии добровольной службы");

    /**
     * The column
     * <code>main_dashboard.total_registered.contract_criterion_percent</code>.
     * Процент подходящих под критерии контрактрой службы
     */
    public final TableField<TotalRegisteredRecord, BigDecimal> CONTRACT_CRITERION_PERCENT = createField(DSL.name("contract_criterion_percent"), SQLDataType.NUMERIC, this, "Процент подходящих под критерии контрактрой службы");

    /**
     * The column <code>main_dashboard.total_registered.recruitment_id</code>.
     */
    public final TableField<TotalRegisteredRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID, this, "");

    /**
     * The column
     * <code>main_dashboard.total_registered.testrecruitment_id</code>.
     */
    public final TableField<TotalRegisteredRecord, String> TESTRECRUITMENT_ID = createField(DSL.name("testrecruitment_id"), SQLDataType.CHAR(36), this, "");

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

    private TotalRegistered(Name alias, Table<TotalRegisteredRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Всего на учете уровень РФ"), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>main_dashboard.total_registered</code> table
     * reference
     */
    public TotalRegistered(String alias) {
        this(DSL.name(alias), TOTAL_REGISTERED);
    }

    /**
     * Create an aliased <code>main_dashboard.total_registered</code> table
     * reference
     */
    public TotalRegistered(Name alias) {
        this(alias, TOTAL_REGISTERED);
    }

    /**
     * Create a <code>main_dashboard.total_registered</code> table reference
     */
    public TotalRegistered() {
        this(DSL.name("total_registered"), null);
    }

    public <O extends Record> TotalRegistered(Table<O> path, ForeignKey<O, TotalRegisteredRecord> childPath, InverseForeignKey<O, TotalRegisteredRecord> parentPath) {
        super(path, childPath, parentPath, TOTAL_REGISTERED);
    }

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

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

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

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

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

    @Override
    public Identity<TotalRegisteredRecord, Long> getIdentity() {
        return (Identity<TotalRegisteredRecord, Long>) super.getIdentity();
    }

    @Override
    public UniqueKey<TotalRegisteredRecord> getPrimaryKey() {
        return Keys.PK_TOTAL_REGISTERED;
    }

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

    private transient PubRecruitmentPath _pubRecruitment;

    /**
     * Get the implicit join path to the <code>public.pub_recruitment</code>
     * table.
     */
    public PubRecruitmentPath pubRecruitment() {
        if (_pubRecruitment == null)
            _pubRecruitment = new PubRecruitmentPath(this, Keys.TOTAL_REGISTERED__MD_TOTAL_REGISTERED_FK1, null);

        return _pubRecruitment;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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