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


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.ervu_dashboard.ErvuDashboard;
import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.Keys;
import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.tables.records.CitizenAppealingIndividualDecisionsRecord;


/**
 * Сведения об обжаловании гражданами отдельных решений и о результатах такого
 * обжалования
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class CitizenAppealingIndividualDecisions extends TableImpl<CitizenAppealingIndividualDecisionsRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>ervu_dashboard.citizen_appealing_individual_decisions</code>
     */
    public static final CitizenAppealingIndividualDecisions CITIZEN_APPEALING_INDIVIDUAL_DECISIONS = new CitizenAppealingIndividualDecisions();

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

    /**
     * The column
     * <code>ervu_dashboard.citizen_appealing_individual_decisions.citizen_appealing_individual_decisions_id</code>.
     */
    public final TableField<CitizenAppealingIndividualDecisionsRecord, Long> CITIZEN_APPEALING_INDIVIDUAL_DECISIONS_ID = createField(DSL.name("citizen_appealing_individual_decisions_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column
     * <code>ervu_dashboard.citizen_appealing_individual_decisions.recruit_id</code>.
     * ссылка на гражданина (citizen)
     */
    public final TableField<CitizenAppealingIndividualDecisionsRecord, UUID> RECRUIT_ID = createField(DSL.name("recruit_id"), SQLDataType.UUID.nullable(false), this, "ссылка на гражданина (citizen)");

    /**
     * The column
     * <code>ervu_dashboard.citizen_appealing_individual_decisions.number_appealed</code>.
     * Номер обжалуемого отдельного решения
     */
    public final TableField<CitizenAppealingIndividualDecisionsRecord, String> NUMBER_APPEALED = createField(DSL.name("number_appealed"), SQLDataType.VARCHAR, this, "Номер обжалуемого отдельного решения");

    /**
     * The column
     * <code>ervu_dashboard.citizen_appealing_individual_decisions.date_appealed</code>.
     * Дата обжалуемого отдельного решения
     */
    public final TableField<CitizenAppealingIndividualDecisionsRecord, Date> DATE_APPEALED = createField(DSL.name("date_appealed"), SQLDataType.DATE, this, "Дата обжалуемого отдельного решения");

    /**
     * The column
     * <code>ervu_dashboard.citizen_appealing_individual_decisions.case_number</code>.
     * Номер принятого решения по результатам обжалования отдельного решения
     */
    public final TableField<CitizenAppealingIndividualDecisionsRecord, String> CASE_NUMBER = createField(DSL.name("case_number"), SQLDataType.VARCHAR, this, "Номер принятого решения по результатам обжалования отдельного решения");

    /**
     * The column
     * <code>ervu_dashboard.citizen_appealing_individual_decisions.decision_date</code>.
     * Дата принятия решения по результатам обжалования отдельного решения
     */
    public final TableField<CitizenAppealingIndividualDecisionsRecord, Date> DECISION_DATE = createField(DSL.name("decision_date"), SQLDataType.DATE, this, "Дата принятия решения по результатам обжалования отдельного решения");

    /**
     * The column
     * <code>ervu_dashboard.citizen_appealing_individual_decisions.result_appeal</code>.
     * Результат обжалования отдельного решения
     */
    public final TableField<CitizenAppealingIndividualDecisionsRecord, String> RESULT_APPEAL = createField(DSL.name("result_appeal"), SQLDataType.VARCHAR, this, "Результат обжалования отдельного решения");

    /**
     * The column
     * <code>ervu_dashboard.citizen_appealing_individual_decisions.name_vc</code>.
     * Наименование военного комиссариата, призывной комиссии, комиссии по
     * постановке на воинский учет, принявших отдельное решение по результатам
     * обжалования отдельного решения
     */
    public final TableField<CitizenAppealingIndividualDecisionsRecord, String> NAME_VC = createField(DSL.name("name_vc"), SQLDataType.VARCHAR, this, "Наименование военного комиссариата, призывной комиссии, комиссии по постановке на воинский учет, принявших отдельное решение по результатам обжалования отдельного решения");

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

    private CitizenAppealingIndividualDecisions(Name alias, Table<CitizenAppealingIndividualDecisionsRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Сведения об обжаловании гражданами отдельных решений и о результатах такого обжалования"), TableOptions.table(), where);
    }

    /**
     * Create an aliased
     * <code>ervu_dashboard.citizen_appealing_individual_decisions</code> table
     * reference
     */
    public CitizenAppealingIndividualDecisions(String alias) {
        this(DSL.name(alias), CITIZEN_APPEALING_INDIVIDUAL_DECISIONS);
    }

    /**
     * Create an aliased
     * <code>ervu_dashboard.citizen_appealing_individual_decisions</code> table
     * reference
     */
    public CitizenAppealingIndividualDecisions(Name alias) {
        this(alias, CITIZEN_APPEALING_INDIVIDUAL_DECISIONS);
    }

    /**
     * Create a
     * <code>ervu_dashboard.citizen_appealing_individual_decisions</code> table
     * reference
     */
    public CitizenAppealingIndividualDecisions() {
        this(DSL.name("citizen_appealing_individual_decisions"), null);
    }

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

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

    @Override
    public UniqueKey<CitizenAppealingIndividualDecisionsRecord> getPrimaryKey() {
        return Keys.PK_CITIZEN_APPEALING_INDIVIDUAL_DECISIONS;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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