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


import ervu_dashboard.ervu_dashboard.db_beans.recruitment_campaign.Keys;
import ervu_dashboard.ervu_dashboard.db_beans.recruitment_campaign.RecruitmentCampaign;
import ervu_dashboard.ervu_dashboard.db_beans.recruitment_campaign.tables.records.SubpoenasRecord;

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

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;


/**
 * Повестки уровень РФ
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Subpoenas extends TableImpl<SubpoenasRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>recruitment_campaign.subpoenas</code>
     */
    public static final Subpoenas SUBPOENAS = new Subpoenas();

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

    /**
     * The column <code>recruitment_campaign.subpoenas.subpoena</code>.
     * Направлено повесток
     */
    public final TableField<SubpoenasRecord, BigDecimal> SUBPOENA = createField(DSL.name("subpoena"), SQLDataType.NUMERIC, this, "Направлено повесток");

    /**
     * The column <code>recruitment_campaign.subpoenas.appeared</code>. Явились
     */
    public final TableField<SubpoenasRecord, BigDecimal> APPEARED = createField(DSL.name("appeared"), SQLDataType.NUMERIC, this, "Явились");

    /**
     * The column <code>recruitment_campaign.subpoenas.not_appeared</code>. Не
     * явились
     */
    public final TableField<SubpoenasRecord, BigDecimal> NOT_APPEARED = createField(DSL.name("not_appeared"), SQLDataType.NUMERIC, this, "Не явились");

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

    /**
     * The column <code>recruitment_campaign.subpoenas.ap_not_required</code>.
     * Явка не требуется
     */
    public final TableField<SubpoenasRecord, BigDecimal> AP_NOT_REQUIRED = createField(DSL.name("ap_not_required"), SQLDataType.NUMERIC, this, "Явка не требуется");

    /**
     * The column
     * <code>recruitment_campaign.subpoenas.restrictions_applied</code>.
     * Наложено ограничений
     */
    public final TableField<SubpoenasRecord, BigDecimal> RESTRICTIONS_APPLIED = createField(DSL.name("restrictions_applied"), SQLDataType.NUMERIC, this, "Наложено ограничений");

    /**
     * The column <code>recruitment_campaign.subpoenas.recording_date</code>.
     * Дата записи
     */
    public final TableField<SubpoenasRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE.nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.DATE)), this, "Дата записи");

    /**
     * The column <code>recruitment_campaign.subpoenas.appeared_percent</code>.
     * Процент явившихся
     */
    public final TableField<SubpoenasRecord, BigDecimal> APPEARED_PERCENT = createField(DSL.name("appeared_percent"), SQLDataType.NUMERIC, this, "Процент явившихся");

    /**
     * The column
     * <code>recruitment_campaign.subpoenas.not_appeared_percent</code>. Процент
     * не явившихся
     */
    public final TableField<SubpoenasRecord, BigDecimal> NOT_APPEARED_PERCENT = createField(DSL.name("not_appeared_percent"), SQLDataType.NUMERIC, this, "Процент не явившихся");

    /**
     * The column
     * <code>recruitment_campaign.subpoenas.not_ap_good_reason_percent</code>.
     * Процент не явившихся по уважительной причине
     */
    public final TableField<SubpoenasRecord, BigDecimal> NOT_AP_GOOD_REASON_PERCENT = createField(DSL.name("not_ap_good_reason_percent"), SQLDataType.NUMERIC, this, "Процент не явившихся по уважительной причине");

    /**
     * The column
     * <code>recruitment_campaign.subpoenas.ap_not_required_percent</code>.
     * Процент тех, где явка не требуется
     */
    public final TableField<SubpoenasRecord, BigDecimal> AP_NOT_REQUIRED_PERCENT = createField(DSL.name("ap_not_required_percent"), SQLDataType.NUMERIC, this, "Процент тех, где явка не требуется");

    /**
     * The column
     * <code>recruitment_campaign.subpoenas.restrictions_applied_percent</code>.
     * Наложено ограничений
     */
    public final TableField<SubpoenasRecord, BigDecimal> RESTRICTIONS_APPLIED_PERCENT = createField(DSL.name("restrictions_applied_percent"), SQLDataType.NUMERIC, this, "Наложено ограничений");

    /**
     * The column
     * <code>recruitment_campaign.subpoenas.introduced_measures</code>. Введено
     * реализатором мер
     */
    public final TableField<SubpoenasRecord, BigDecimal> INTRODUCED_MEASURES = createField(DSL.name("introduced_measures"), SQLDataType.NUMERIC, this, "Введено реализатором мер");

    /**
     * The column
     * <code>recruitment_campaign.subpoenas.introduced_measures_percent</code>.
     * Процент введенных реализатором мер
     */
    public final TableField<SubpoenasRecord, BigDecimal> INTRODUCED_MEASURES_PERCENT = createField(DSL.name("introduced_measures_percent"), SQLDataType.NUMERIC, this, "Процент введенных реализатором мер");

    /**
     * The column <code>recruitment_campaign.subpoenas.recruitment_id</code>.
     */
    public final TableField<SubpoenasRecord, String> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.CHAR(36).nullable(false), this, "");

    /**
     * The column <code>recruitment_campaign.subpoenas.rest</code>. Остальные
     */
    public final TableField<SubpoenasRecord, BigDecimal> REST = createField(DSL.name("rest"), SQLDataType.NUMERIC, this, "Остальные");

    /**
     * The column <code>recruitment_campaign.subpoenas.spring_autumn</code>.
     */
    public final TableField<SubpoenasRecord, String> SPRING_AUTUMN = createField(DSL.name("spring_autumn"), SQLDataType.CHAR(36).nullable(false), this, "");

    /**
     * The column <code>recruitment_campaign.subpoenas.id_subpoena</code>.
     */
    public final TableField<SubpoenasRecord, Long> ID_SUBPOENA = createField(DSL.name("id_subpoena"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

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

    /**
     * Create an aliased <code>recruitment_campaign.subpoenas</code> table
     * reference
     */
    public Subpoenas(String alias) {
        this(DSL.name(alias), SUBPOENAS);
    }

    /**
     * Create an aliased <code>recruitment_campaign.subpoenas</code> table
     * reference
     */
    public Subpoenas(Name alias) {
        this(alias, SUBPOENAS);
    }

    /**
     * Create a <code>recruitment_campaign.subpoenas</code> table reference
     */
    public Subpoenas() {
        this(DSL.name("subpoenas"), null);
    }

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

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

    @Override
    public UniqueKey<SubpoenasRecord> getPrimaryKey() {
        return Keys.SUBPOENAS_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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