/*
 * This file is generated by jOOQ.
 */
package ru.micord.webbpm.ervu.business_metrics.db_beans.registration_change_address.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.registration_change_address.Keys;
import ru.micord.webbpm.ervu.business_metrics.db_beans.registration_change_address.RegistrationChangeAddress;
import ru.micord.webbpm.ervu.business_metrics.db_beans.registration_change_address.tables.records.ChangeDataFromGirVuRecord;


/**
 * Постановка на воинский учет при смене адреса. Изменение сведений из ГИР ВУ
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ChangeDataFromGirVu extends TableImpl<ChangeDataFromGirVuRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>registration_change_address.change_data_from_gir_vu</code>
     */
    public static final ChangeDataFromGirVu CHANGE_DATA_FROM_GIR_VU = new ChangeDataFromGirVu();

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

    /**
     * The column
     * <code>registration_change_address.change_data_from_gir_vu.change_data_from_gir_vu_id</code>.
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> CHANGE_DATA_FROM_GIR_VU_ID = createField(DSL.name("change_data_from_gir_vu_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

    /**
     * The column
     * <code>registration_change_address.change_data_from_gir_vu.update_date</code>.
     */
    public final TableField<ChangeDataFromGirVuRecord, 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>registration_change_address.change_data_from_gir_vu.info_date</code>.
     */
    public final TableField<ChangeDataFromGirVuRecord, Date> INFO_DATE = createField(DSL.name("info_date"), SQLDataType.DATE.nullable(false), this, "");

    /**
     * The column
     * <code>registration_change_address.change_data_from_gir_vu.count_all</code>.
     * всего
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_ALL = createField(DSL.name("count_all"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "всего");

    /**
     * The column
     * <code>registration_change_address.change_data_from_gir_vu.count_requested_to_send</code>.
     * запрошено личных дел
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_REQUESTED_TO_SEND = createField(DSL.name("count_requested_to_send"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "запрошено личных дел");

    /**
     * The column
     * <code>registration_change_address.change_data_from_gir_vu.count_accepted_to_send_from_first</code>.
     * принято решений о направлении дела из первого вк
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_ACCEPTED_TO_SEND_FROM_FIRST = createField(DSL.name("count_accepted_to_send_from_first"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "принято решений о направлении дела из первого вк");

    /**
     * The column
     * <code>registration_change_address.change_data_from_gir_vu.count_solution_send_signed</code>.
     * подписано решений о направлении
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_SOLUTION_SEND_SIGNED = createField(DSL.name("count_solution_send_signed"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "подписано решений о направлении");

    /**
     * The column
     * <code>registration_change_address.change_data_from_gir_vu.count_unloaded</code>.
     * выгружено дел
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_UNLOADED = createField(DSL.name("count_unloaded"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "выгружено дел");

    /**
     * The column
     * <code>registration_change_address.change_data_from_gir_vu.count_solutions_registration_formed</code>.
     * сформировано решений по постановке на ВУ по новому адресу
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_SOLUTIONS_REGISTRATION_FORMED = createField(DSL.name("count_solutions_registration_formed"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "сформировано решений по постановке на ВУ по новому адресу");

    /**
     * The column
     * <code>registration_change_address.change_data_from_gir_vu.count_solutions_registration_signed</code>.
     * подписано решений по постановке на ВУ по новому адресу
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_SOLUTIONS_REGISTRATION_SIGNED = createField(DSL.name("count_solutions_registration_signed"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "подписано решений по постановке на ВУ по новому адресу");

    /**
     * The column
     * <code>registration_change_address.change_data_from_gir_vu.count_denied_requests</code>.
     * Отклонено запросов личного дела
     */
    public final TableField<ChangeDataFromGirVuRecord, Long> COUNT_DENIED_REQUESTS = createField(DSL.name("count_denied_requests"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "Отклонено запросов личного дела");

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

    private ChangeDataFromGirVu(Name alias, Table<ChangeDataFromGirVuRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Постановка на воинский учет при смене адреса. Изменение сведений из ГИР ВУ"), TableOptions.table(), where);
    }

    /**
     * Create an aliased
     * <code>registration_change_address.change_data_from_gir_vu</code> table
     * reference
     */
    public ChangeDataFromGirVu(String alias) {
        this(DSL.name(alias), CHANGE_DATA_FROM_GIR_VU);
    }

    /**
     * Create an aliased
     * <code>registration_change_address.change_data_from_gir_vu</code> table
     * reference
     */
    public ChangeDataFromGirVu(Name alias) {
        this(alias, CHANGE_DATA_FROM_GIR_VU);
    }

    /**
     * Create a <code>registration_change_address.change_data_from_gir_vu</code>
     * table reference
     */
    public ChangeDataFromGirVu() {
        this(DSL.name("change_data_from_gir_vu"), null);
    }

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

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

    @Override
    public UniqueKey<ChangeDataFromGirVuRecord> getPrimaryKey() {
        return Keys.CHANGE_DATA_FROM_GIR_VU_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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