/*
 * This file is generated by jOOQ.
 */
package ru.micord.ervu_dashboard.db_beans.forecast.tables;


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

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.Identity;
import org.jooq.Name;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
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;

import ru.micord.ervu_dashboard.db_beans.forecast.Forecast;
import ru.micord.ervu_dashboard.db_beans.forecast.Keys;
import ru.micord.ervu_dashboard.db_beans.forecast.tables.records.ReportingMilitaryCommissariatRecord;


/**
 * Явка в Военный комиссариат
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ReportingMilitaryCommissariat extends TableImpl<ReportingMilitaryCommissariatRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>forecast.reporting_military_commissariat</code>
     */
    public static final ReportingMilitaryCommissariat REPORTING_MILITARY_COMMISSARIAT = new ReportingMilitaryCommissariat();

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

    /**
     * The column
     * <code>forecast.reporting_military_commissariat.reporting_military_commissariat_id</code>.
     */
    public final TableField<ReportingMilitaryCommissariatRecord, Long> REPORTING_MILITARY_COMMISSARIAT_ID = createField(DSL.name("reporting_military_commissariat_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column
     * <code>forecast.reporting_military_commissariat.recruitment_id</code>.
     */
    public final TableField<ReportingMilitaryCommissariatRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID.nullable(false), this, "");

    /**
     * The column
     * <code>forecast.reporting_military_commissariat.recording_date</code>.
     */
    public final TableField<ReportingMilitaryCommissariatRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE.nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.DATE)), this, "");

    /**
     * The column <code>forecast.reporting_military_commissariat.schema</code>.
     */
    public final TableField<ReportingMilitaryCommissariatRecord, String> SCHEMA = createField(DSL.name("schema"), SQLDataType.VARCHAR(64).nullable(false).defaultValue(DSL.field(DSL.raw("'empty'::character varying"), SQLDataType.VARCHAR)), this, "");

    /**
     * The column
     * <code>forecast.reporting_military_commissariat.subpoenaed_appear</code>.
     * Явились по повесткам
     */
    public final TableField<ReportingMilitaryCommissariatRecord, BigDecimal> SUBPOENAED_APPEAR = createField(DSL.name("subpoenaed_appear"), SQLDataType.NUMERIC, this, "Явились по повесткам");

    /**
     * The column
     * <code>forecast.reporting_military_commissariat.missed_deadline</code>. Не
     * явились в срок
     */
    public final TableField<ReportingMilitaryCommissariatRecord, BigDecimal> MISSED_DEADLINE = createField(DSL.name("missed_deadline"), SQLDataType.NUMERIC, this, "Не явились в срок");

    /**
     * The column
     * <code>forecast.reporting_military_commissariat.missed_deadline_reason</code>.
     * Не явились по уважительной причине
     */
    public final TableField<ReportingMilitaryCommissariatRecord, BigDecimal> MISSED_DEADLINE_REASON = createField(DSL.name("missed_deadline_reason"), SQLDataType.NUMERIC, this, "Не явились по уважительной причине");

    /**
     * The column
     * <code>forecast.reporting_military_commissariat.subpoenas_issued</code>.
     * Вручено повесток
     */
    public final TableField<ReportingMilitaryCommissariatRecord, BigDecimal> SUBPOENAS_ISSUED = createField(DSL.name("subpoenas_issued"), SQLDataType.NUMERIC, this, "Вручено повесток");

    /**
     * The column
     * <code>forecast.reporting_military_commissariat.retrieved_7_days</code>.
     * Вручено через 7 дней(автоматически)
     */
    public final TableField<ReportingMilitaryCommissariatRecord, BigDecimal> RETRIEVED_7_DAYS = createField(DSL.name("retrieved_7_days"), SQLDataType.NUMERIC, this, "Вручено через 7 дней(автоматически)");

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

    private ReportingMilitaryCommissariat(Name alias, Table<ReportingMilitaryCommissariatRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Явка в Военный комиссариат"), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>forecast.reporting_military_commissariat</code>
     * table reference
     */
    public ReportingMilitaryCommissariat(String alias) {
        this(DSL.name(alias), REPORTING_MILITARY_COMMISSARIAT);
    }

    /**
     * Create an aliased <code>forecast.reporting_military_commissariat</code>
     * table reference
     */
    public ReportingMilitaryCommissariat(Name alias) {
        this(alias, REPORTING_MILITARY_COMMISSARIAT);
    }

    /**
     * Create a <code>forecast.reporting_military_commissariat</code> table
     * reference
     */
    public ReportingMilitaryCommissariat() {
        this(DSL.name("reporting_military_commissariat"), null);
    }

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

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

    @Override
    public UniqueKey<ReportingMilitaryCommissariatRecord> getPrimaryKey() {
        return Keys.PK_REPORTING_MILITARY_COMMISSARIAT;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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