/*
 * This file is generated by jOOQ.
 */
package ru.micord.webbpm.ervu.business_metrics.db_beans.init_registration_info.tables;


import java.sql.Date;
import java.sql.Timestamp;
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;

import ru.micord.webbpm.ervu.business_metrics.db_beans.init_registration_info.InitRegistrationInfo;
import ru.micord.webbpm.ervu.business_metrics.db_beans.init_registration_info.Keys;
import ru.micord.webbpm.ervu.business_metrics.db_beans.init_registration_info.tables.records.IncomingCreatingRecordsRecord;


/**
 * Первоначальная постановка на учет. Информация о записях поступивших из ГИР ВУ
 * и созданых гражданина
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class IncomingCreatingRecords extends TableImpl<IncomingCreatingRecordsRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>init_registration_info.incoming_creating_records</code>
     */
    public static final IncomingCreatingRecords INCOMING_CREATING_RECORDS = new IncomingCreatingRecords();

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

    /**
     * The column
     * <code>init_registration_info.incoming_creating_records.incoming_creating_records_id</code>.
     */
    public final TableField<IncomingCreatingRecordsRecord, Long> INCOMING_CREATING_RECORDS_ID = createField(DSL.name("incoming_creating_records_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column
     * <code>init_registration_info.incoming_creating_records.recruitment_id</code>.
     */
    public final TableField<IncomingCreatingRecordsRecord, String> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.VARCHAR(36).nullable(false), this, "");

    /**
     * The column
     * <code>init_registration_info.incoming_creating_records.update_date</code>.
     */
    public final TableField<IncomingCreatingRecordsRecord, Timestamp> UPDATE_DATE = createField(DSL.name("update_date"), SQLDataType.TIMESTAMP(0).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.TIMESTAMP)), this, "");

    /**
     * The column
     * <code>init_registration_info.incoming_creating_records.info_date</code>.
     */
    public final TableField<IncomingCreatingRecordsRecord, Date> INFO_DATE = createField(DSL.name("info_date"), SQLDataType.DATE.nullable(false), this, "");

    /**
     * The column
     * <code>init_registration_info.incoming_creating_records.records_gir_vu</code>.
     * записей поступило из ГИР ВУ
     */
    public final TableField<IncomingCreatingRecordsRecord, Long> RECORDS_GIR_VU = createField(DSL.name("records_gir_vu"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "записей поступило из ГИР ВУ");

    /**
     * The column
     * <code>init_registration_info.incoming_creating_records.records_citizen_create</code>.
     * записей гражданина создано
     */
    public final TableField<IncomingCreatingRecordsRecord, Long> RECORDS_CITIZEN_CREATE = createField(DSL.name("records_citizen_create"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "записей гражданина создано");

    /**
     * The column
     * <code>init_registration_info.incoming_creating_records.count_records_uploaded</code>.
     * Количество записей, загруженных в ГИС ЕРВУ
     */
    public final TableField<IncomingCreatingRecordsRecord, Long> COUNT_RECORDS_UPLOADED = createField(DSL.name("count_records_uploaded"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "Количество записей, загруженных в ГИС ЕРВУ");

    /**
     * The column
     * <code>init_registration_info.incoming_creating_records.count_records_created</code>.
     * Количество созданных записей гражданина
     */
    public final TableField<IncomingCreatingRecordsRecord, Long> COUNT_RECORDS_CREATED = createField(DSL.name("count_records_created"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "Количество созданных записей гражданина");

    /**
     * The column
     * <code>init_registration_info.incoming_creating_records.count_collated_data</code>.
     * данных гражданина сверено с данными ГИС ЕРВУ
     */
    public final TableField<IncomingCreatingRecordsRecord, Long> COUNT_COLLATED_DATA = createField(DSL.name("count_collated_data"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "данных гражданина сверено с данными ГИС ЕРВУ");

    /**
     * The column
     * <code>init_registration_info.incoming_creating_records.count_collated</code>.
     * записей сопоставлено с ГИС ЕРВУ
     */
    public final TableField<IncomingCreatingRecordsRecord, Long> COUNT_COLLATED = createField(DSL.name("count_collated"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "записей сопоставлено с ГИС ЕРВУ");

    /**
     * The column
     * <code>init_registration_info.incoming_creating_records.count_deregistered_declaration</code>.
     * граждан снято с учета по заявлению с ЕПГУ
     */
    public final TableField<IncomingCreatingRecordsRecord, Long> COUNT_DEREGISTERED_DECLARATION = createField(DSL.name("count_deregistered_declaration"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "граждан снято с учета по заявлению с ЕПГУ");

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

    private IncomingCreatingRecords(Name alias, Table<IncomingCreatingRecordsRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Первоначальная постановка на учет. Информация о записях поступивших из ГИР ВУ и созданых гражданина"), TableOptions.table(), where);
    }

    /**
     * Create an aliased
     * <code>init_registration_info.incoming_creating_records</code> table
     * reference
     */
    public IncomingCreatingRecords(String alias) {
        this(DSL.name(alias), INCOMING_CREATING_RECORDS);
    }

    /**
     * Create an aliased
     * <code>init_registration_info.incoming_creating_records</code> table
     * reference
     */
    public IncomingCreatingRecords(Name alias) {
        this(alias, INCOMING_CREATING_RECORDS);
    }

    /**
     * Create a <code>init_registration_info.incoming_creating_records</code>
     * table reference
     */
    public IncomingCreatingRecords() {
        this(DSL.name("incoming_creating_records"), null);
    }

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

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

    @Override
    public UniqueKey<IncomingCreatingRecordsRecord> getPrimaryKey() {
        return Keys.INCOMING_CREATING_RECORDS_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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