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


/**
 * Сведения об образовании гражданина
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class CitizenEducation extends TableImpl<CitizenEducationRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ervu_dashboard.citizen_education</code>
     */
    public static final CitizenEducation CITIZEN_EDUCATION = new CitizenEducation();

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

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.citizen_education_id</code>.
     */
    public final TableField<CitizenEducationRecord, Long> CITIZEN_EDUCATION_ID = createField(DSL.name("citizen_education_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>ervu_dashboard.citizen_education.recruit_id</code>.
     */
    public final TableField<CitizenEducationRecord, UUID> RECRUIT_ID = createField(DSL.name("recruit_id"), SQLDataType.UUID.nullable(false), this, "");

    /**
     * The column <code>ervu_dashboard.citizen_education.inn</code>. ИНН
     */
    public final TableField<CitizenEducationRecord, String> INN = createField(DSL.name("inn"), SQLDataType.VARCHAR, this, "ИНН");

    /**
     * The column <code>ervu_dashboard.citizen_education.kpp</code>. КПП
     */
    public final TableField<CitizenEducationRecord, String> KPP = createField(DSL.name("kpp"), SQLDataType.VARCHAR, this, "КПП");

    /**
     * The column <code>ervu_dashboard.citizen_education.ogrn</code>. ОГРН
     */
    public final TableField<CitizenEducationRecord, String> OGRN = createField(DSL.name("ogrn"), SQLDataType.VARCHAR, this, "ОГРН");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.educational_institution_name</code>.
     * Наименование образовательного учреждения
     */
    public final TableField<CitizenEducationRecord, String> EDUCATIONAL_INSTITUTION_NAME = createField(DSL.name("educational_institution_name"), SQLDataType.CLOB, this, "Наименование образовательного учреждения");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.educational_institution_address</code>.
     * Адрес образовательного учреждения
     */
    public final TableField<CitizenEducationRecord, String> EDUCATIONAL_INSTITUTION_ADDRESS = createField(DSL.name("educational_institution_address"), SQLDataType.CLOB, this, "Адрес образовательного учреждения");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.educational_institution_type_code</code>.
     * Код типа образовательного учреждения
     */
    public final TableField<CitizenEducationRecord, String> EDUCATIONAL_INSTITUTION_TYPE_CODE = createField(DSL.name("educational_institution_type_code"), SQLDataType.VARCHAR, this, "Код типа образовательного учреждения");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.education_status_code</code>. Код
     * статуса обучения
     */
    public final TableField<CitizenEducationRecord, String> EDUCATION_STATUS_CODE = createField(DSL.name("education_status_code"), SQLDataType.VARCHAR, this, "Код статуса обучения");

    /**
     * The column <code>ervu_dashboard.citizen_education.recovery_date</code>.
     * Дата восстановления
     */
    public final TableField<CitizenEducationRecord, Date> RECOVERY_DATE = createField(DSL.name("recovery_date"), SQLDataType.DATE, this, "Дата восстановления");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.recovery_order_date</code>. Дата
     * приказа на восстановление
     */
    public final TableField<CitizenEducationRecord, Date> RECOVERY_ORDER_DATE = createField(DSL.name("recovery_order_date"), SQLDataType.DATE, this, "Дата приказа на восстановление");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.recovery_order_number</code>.
     * Номер приказа на восстановление
     */
    public final TableField<CitizenEducationRecord, String> RECOVERY_ORDER_NUMBER = createField(DSL.name("recovery_order_number"), SQLDataType.VARCHAR, this, "Номер приказа на восстановление");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.education_level_code</code>. Код
     * уровня образования
     */
    public final TableField<CitizenEducationRecord, String> EDUCATION_LEVEL_CODE = createField(DSL.name("education_level_code"), SQLDataType.VARCHAR, this, "Код уровня образования");

    /**
     * The column <code>ervu_dashboard.citizen_education.grade_number</code>.
     * Номер класса/курса
     */
    public final TableField<CitizenEducationRecord, String> GRADE_NUMBER = createField(DSL.name("grade_number"), SQLDataType.VARCHAR, this, "Номер класса/курса");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.leave_start_date</code>. Дата
     * начала отпуска
     */
    public final TableField<CitizenEducationRecord, Date> LEAVE_START_DATE = createField(DSL.name("leave_start_date"), SQLDataType.DATE, this, "Дата начала отпуска");

    /**
     * The column <code>ervu_dashboard.citizen_education.leave_end_date</code>.
     * Дата окончания отпуска
     */
    public final TableField<CitizenEducationRecord, Date> LEAVE_END_DATE = createField(DSL.name("leave_end_date"), SQLDataType.DATE, this, "Дата окончания отпуска");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.leave_reason_code</code>. Код
     * причины отпуска
     */
    public final TableField<CitizenEducationRecord, String> LEAVE_REASON_CODE = createField(DSL.name("leave_reason_code"), SQLDataType.VARCHAR, this, "Код причины отпуска");

    /**
     * The column <code>ervu_dashboard.citizen_education.admission_date</code>.
     * Дата зачисления
     */
    public final TableField<CitizenEducationRecord, Date> ADMISSION_DATE = createField(DSL.name("admission_date"), SQLDataType.DATE, this, "Дата зачисления");

    /**
     * The column <code>ervu_dashboard.citizen_education.first_education</code>.
     * Признак получения образования впервые
     */
    public final TableField<CitizenEducationRecord, Boolean> FIRST_EDUCATION = createField(DSL.name("first_education"), SQLDataType.BOOLEAN.defaultValue(DSL.field(DSL.raw("false"), SQLDataType.BOOLEAN)), this, "Признак получения образования впервые");

    /**
     * The column <code>ervu_dashboard.citizen_education.vus_spec</code>.
     * Признак наличия специальности/направления подготовки/профессии
     * относящейся                        к перечню, при наличии которых
     * граждане женского пола получают военно-учетные                       
     * специальности и подлежат постановке на воинский учет
     */
    public final TableField<CitizenEducationRecord, Boolean> VUS_SPEC = createField(DSL.name("vus_spec"), SQLDataType.BOOLEAN.defaultValue(DSL.field(DSL.raw("false"), SQLDataType.BOOLEAN)), this, "Признак наличия специальности/направления подготовки/профессии относящейся                        к перечню, при наличии которых граждане женского пола получают военно-учетные                        специальности и подлежат постановке на воинский учет");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.education_start_date</code>. Дата
     * начала обучения
     */
    public final TableField<CitizenEducationRecord, Date> EDUCATION_START_DATE = createField(DSL.name("education_start_date"), SQLDataType.DATE, this, "Дата начала обучения");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.planned_education_end_date</code>.
     * Планируемая дата окончания обучения
     */
    public final TableField<CitizenEducationRecord, Date> PLANNED_EDUCATION_END_DATE = createField(DSL.name("planned_education_end_date"), SQLDataType.DATE, this, "Планируемая дата окончания обучения");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.education_form_code</code>. Код
     * формы обучения
     */
    public final TableField<CitizenEducationRecord, String> EDUCATION_FORM_CODE = createField(DSL.name("education_form_code"), SQLDataType.VARCHAR, this, "Код формы обучения");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.minobr_spec_code</code>. Код
     * специальности минобразования
     */
    public final TableField<CitizenEducationRecord, String> MINOBR_SPEC_CODE = createField(DSL.name("minobr_spec_code"), SQLDataType.VARCHAR, this, "Код специальности минобразования");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.minprosv_spec_code</code>. Код
     * специальности минпросвещения
     */
    public final TableField<CitizenEducationRecord, String> MINPROSV_SPEC_CODE = createField(DSL.name("minprosv_spec_code"), SQLDataType.VARCHAR, this, "Код специальности минпросвещения");

    /**
     * The column <code>ervu_dashboard.citizen_education.expulsion_date</code>.
     * Дата отчисления
     */
    public final TableField<CitizenEducationRecord, Date> EXPULSION_DATE = createField(DSL.name("expulsion_date"), SQLDataType.DATE, this, "Дата отчисления");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.expulsion_order_date</code>. Дата
     * приказа на отчисление
     */
    public final TableField<CitizenEducationRecord, Date> EXPULSION_ORDER_DATE = createField(DSL.name("expulsion_order_date"), SQLDataType.DATE, this, "Дата приказа на отчисление");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.expulsion_order_number</code>.
     * Номер приказа на отчисление
     */
    public final TableField<CitizenEducationRecord, String> EXPULSION_ORDER_NUMBER = createField(DSL.name("expulsion_order_number"), SQLDataType.VARCHAR, this, "Номер приказа на отчисление");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.military_education_start_date</code>.
     * Дата начала обучения в военно-учебном центре
     */
    public final TableField<CitizenEducationRecord, Date> MILITARY_EDUCATION_START_DATE = createField(DSL.name("military_education_start_date"), SQLDataType.DATE, this, "Дата начала обучения в военно-учебном центре");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.military_education_end_date</code>.
     * Дата окончания обучения в военно-учебном центре
     */
    public final TableField<CitizenEducationRecord, Date> MILITARY_EDUCATION_END_DATE = createField(DSL.name("military_education_end_date"), SQLDataType.DATE, this, "Дата окончания обучения в военно-учебном центре");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.admission_order_date</code>. Дата
     * приказа о зачислении
     */
    public final TableField<CitizenEducationRecord, Date> ADMISSION_ORDER_DATE = createField(DSL.name("admission_order_date"), SQLDataType.DATE, this, "Дата приказа о зачислении");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.admission_order_number</code>.
     * Номер приказа о зачислении
     */
    public final TableField<CitizenEducationRecord, String> ADMISSION_ORDER_NUMBER = createField(DSL.name("admission_order_number"), SQLDataType.VARCHAR, this, "Номер приказа о зачислении");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.military_department_education_start_date</code>.
     */
    public final TableField<CitizenEducationRecord, Date> MILITARY_DEPARTMENT_EDUCATION_START_DATE = createField(DSL.name("military_department_education_start_date"), SQLDataType.DATE, this, "");

    /**
     * The column
     * <code>ervu_dashboard.citizen_education.military_department_education_end_date</code>.
     */
    public final TableField<CitizenEducationRecord, Date> MILITARY_DEPARTMENT_EDUCATION_END_DATE = createField(DSL.name("military_department_education_end_date"), SQLDataType.DATE, this, "");

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

    private CitizenEducation(Name alias, Table<CitizenEducationRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Сведения об образовании гражданина"), TableOptions.table(), where);
    }

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

    /**
     * Create an aliased <code>ervu_dashboard.citizen_education</code> table
     * reference
     */
    public CitizenEducation(Name alias) {
        this(alias, CITIZEN_EDUCATION);
    }

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

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

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

    @Override
    public UniqueKey<CitizenEducationRecord> getPrimaryKey() {
        return Keys.CITIZEN_EDUCATION_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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