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


/**
 * Сведения о трудовой деятельности
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class CitizenWorkActivity extends TableImpl<CitizenWorkActivityRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>ervu_dashboard.citizen_work_activity</code>
     */
    public static final CitizenWorkActivity CITIZEN_WORK_ACTIVITY = new CitizenWorkActivity();

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

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.citizen_work_activity_id</code>.
     */
    public final TableField<CitizenWorkActivityRecord, Long> CITIZEN_WORK_ACTIVITY_ID = createField(DSL.name("citizen_work_activity_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>ervu_dashboard.citizen_work_activity.place_work</code>.
     * Место работы
     */
    public final TableField<CitizenWorkActivityRecord, String> PLACE_WORK = createField(DSL.name("place_work"), SQLDataType.VARCHAR, this, "Место работы");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.employer_category</code>.
     * Категория работодателя
     */
    public final TableField<CitizenWorkActivityRecord, String> EMPLOYER_CATEGORY = createField(DSL.name("employer_category"), SQLDataType.VARCHAR, this, "Категория работодателя");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.organization_name</code>.
     * Наименование организации
     */
    public final TableField<CitizenWorkActivityRecord, String> ORGANIZATION_NAME = createField(DSL.name("organization_name"), SQLDataType.VARCHAR, this, "Наименование организации");

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

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

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

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

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.organization_address</code>.
     * Адрес организации
     */
    public final TableField<CitizenWorkActivityRecord, String> ORGANIZATION_ADDRESS = createField(DSL.name("organization_address"), SQLDataType.VARCHAR, this, "Адрес организации");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.employer_status</code>. Статус
     * работодателя
     */
    public final TableField<CitizenWorkActivityRecord, String> EMPLOYER_STATUS = createField(DSL.name("employer_status"), SQLDataType.VARCHAR, this, "Статус работодателя");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.type_separate_division</code>.
     * Тип обособленного подразделения работодателя
     */
    public final TableField<CitizenWorkActivityRecord, String> TYPE_SEPARATE_DIVISION = createField(DSL.name("type_separate_division"), SQLDataType.VARCHAR, this, "Тип обособленного подразделения работодателя");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.address_separate_division</code>.
     * Адрес обособленного структурного подразделения работодателя
     */
    public final TableField<CitizenWorkActivityRecord, String> ADDRESS_SEPARATE_DIVISION = createField(DSL.name("address_separate_division"), SQLDataType.VARCHAR, this, "Адрес обособленного структурного подразделения работодателя");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.type_hr_event</code>. Тип
     * кадрового мероприятия 
     */
    public final TableField<CitizenWorkActivityRecord, String> TYPE_HR_EVENT = createField(DSL.name("type_hr_event"), SQLDataType.VARCHAR, this, "Тип кадрового мероприятия ");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.date_hr_event</code>. Дата
     * кадрового мероприятия
     */
    public final TableField<CitizenWorkActivityRecord, Date> DATE_HR_EVENT = createField(DSL.name("date_hr_event"), SQLDataType.DATE, this, "Дата кадрового мероприятия");

    /**
     * The column <code>ervu_dashboard.citizen_work_activity.job_title</code>.
     * Должность
     */
    public final TableField<CitizenWorkActivityRecord, String> JOB_TITLE = createField(DSL.name("job_title"), SQLDataType.VARCHAR, this, "Должность");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.info_parental_leave</code>.
     * Сведения о нахождении в отпуске по уходу за ребенком
     */
    public final TableField<CitizenWorkActivityRecord, String> INFO_PARENTAL_LEAVE = createField(DSL.name("info_parental_leave"), SQLDataType.VARCHAR, this, "Сведения о нахождении в отпуске по уходу за ребенком");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.start_date_parental_leave</code>.
     * Дата начала отпуска по уходу за ребенком
     */
    public final TableField<CitizenWorkActivityRecord, Date> START_DATE_PARENTAL_LEAVE = createField(DSL.name("start_date_parental_leave"), SQLDataType.DATE, this, "Дата начала отпуска по уходу за ребенком");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.end_date_parental_leave</code>.
     * Дата окончания отпуска по уходу за ребенком
     */
    public final TableField<CitizenWorkActivityRecord, Date> END_DATE_PARENTAL_LEAVE = createField(DSL.name("end_date_parental_leave"), SQLDataType.DATE, this, "Дата окончания отпуска по уходу за ребенком");

    /**
     * The column <code>ervu_dashboard.citizen_work_activity.ogrn_ip</code>.
     * ОГРНИП (ИП)
     */
    public final TableField<CitizenWorkActivityRecord, String> OGRN_IP = createField(DSL.name("ogrn_ip"), SQLDataType.VARCHAR, this, "ОГРНИП (ИП)");

    /**
     * The column <code>ervu_dashboard.citizen_work_activity.date_reg_ip</code>.
     * Дата регистрации в качестве ИП
     */
    public final TableField<CitizenWorkActivityRecord, Date> DATE_REG_IP = createField(DSL.name("date_reg_ip"), SQLDataType.DATE, this, "Дата регистрации в качестве ИП");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.date_dereg_ip</code>. Дата
     * снятия с учета в качестве ИП
     */
    public final TableField<CitizenWorkActivityRecord, Date> DATE_DEREG_IP = createField(DSL.name("date_dereg_ip"), SQLDataType.DATE, this, "Дата снятия с учета в качестве ИП");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.date_term_reg_ip</code>. Дата
     * прекращения регистрации в качестве ИП
     */
    public final TableField<CitizenWorkActivityRecord, Date> DATE_TERM_REG_IP = createField(DSL.name("date_term_reg_ip"), SQLDataType.DATE, this, "Дата прекращения регистрации в качестве ИП");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.date_reg_self</code>. Дата
     * постановки на учет (Самозанятый)
     */
    public final TableField<CitizenWorkActivityRecord, Date> DATE_REG_SELF = createField(DSL.name("date_reg_self"), SQLDataType.DATE, this, "Дата постановки на учет (Самозанятый)");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.date_dereg_self</code>. Дата
     * снятия с учета (Самозанятый)
     */
    public final TableField<CitizenWorkActivityRecord, Date> DATE_DEREG_SELF = createField(DSL.name("date_dereg_self"), SQLDataType.DATE, this, "Дата снятия с учета (Самозанятый)");

    /**
     * The column
     * <code>ervu_dashboard.citizen_work_activity.info_separator_didvision</code>.
     * Сведения о работе гражданина в обособленном подразделении работодателя
     */
    public final TableField<CitizenWorkActivityRecord, String> INFO_SEPARATOR_DIDVISION = createField(DSL.name("info_separator_didvision"), SQLDataType.VARCHAR, this, "Сведения о работе гражданина в обособленном подразделении работодателя");

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

    private CitizenWorkActivity(Name alias, Table<CitizenWorkActivityRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Сведения о трудовой деятельности"), TableOptions.table(), where);
    }

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

    /**
     * Create an aliased <code>ervu_dashboard.citizen_work_activity</code> table
     * reference
     */
    public CitizenWorkActivity(Name alias) {
        this(alias, CITIZEN_WORK_ACTIVITY);
    }

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

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

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

    @Override
    public UniqueKey<CitizenWorkActivityRecord> getPrimaryKey() {
        return Keys.CITIZEN_WORK_ACTIVITY_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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