/*
 * 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.CitizenIndividualDecisionsRecord;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>ervu_dashboard.citizen_individual_decisions</code>
     */
    public static final CitizenIndividualDecisions CITIZEN_INDIVIDUAL_DECISIONS = new CitizenIndividualDecisions();

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

    /**
     * The column
     * <code>ervu_dashboard.citizen_individual_decisions.citizen_individual_decisions_id</code>.
     */
    public final TableField<CitizenIndividualDecisionsRecord, Long> CITIZEN_INDIVIDUAL_DECISIONS_ID = createField(DSL.name("citizen_individual_decisions_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

    /**
     * The column
     * <code>ervu_dashboard.citizen_individual_decisions.name_individual_solution</code>.
     * Наименование отдельного решения
     */
    public final TableField<CitizenIndividualDecisionsRecord, String> NAME_INDIVIDUAL_SOLUTION = createField(DSL.name("name_individual_solution"), SQLDataType.VARCHAR, this, "Наименование отдельного решения");

    /**
     * The column
     * <code>ervu_dashboard.citizen_individual_decisions.name_body</code>.
     * Наименование органа, принявшего отдельное решение
     */
    public final TableField<CitizenIndividualDecisionsRecord, String> NAME_BODY = createField(DSL.name("name_body"), SQLDataType.VARCHAR, this, "Наименование органа, принявшего отдельное решение");

    /**
     * The column
     * <code>ervu_dashboard.citizen_individual_decisions.date_individual_decision</code>.
     * Дата принятия отдельного решения
     */
    public final TableField<CitizenIndividualDecisionsRecord, Date> DATE_INDIVIDUAL_DECISION = createField(DSL.name("date_individual_decision"), SQLDataType.DATE, this, "Дата принятия отдельного решения");

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

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

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

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

    /**
     * Create an aliased
     * <code>ervu_dashboard.citizen_individual_decisions</code> table reference
     */
    public CitizenIndividualDecisions(Name alias) {
        this(alias, CITIZEN_INDIVIDUAL_DECISIONS);
    }

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

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

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

    @Override
    public UniqueKey<CitizenIndividualDecisionsRecord> getPrimaryKey() {
        return Keys.PK_CITIZEN_INDIVIDUAL_DECISIONS;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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