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


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class IncidentsFilesRequests extends TableImpl<IncidentsFilesRequestsRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>metrics.incidents_files_requests</code>
     */
    public static final IncidentsFilesRequests INCIDENTS_FILES_REQUESTS = new IncidentsFilesRequests();

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

    /**
     * The column
     * <code>metrics.incidents_files_requests.incidents_files_requests_id</code>.
     */
    public final TableField<IncidentsFilesRequestsRecord, Long> INCIDENTS_FILES_REQUESTS_ID = createField(DSL.name("incidents_files_requests_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

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

    /**
     * The column
     * <code>metrics.incidents_files_requests.count_requisites_entered</code>.
     * реквизитов обращений внесено
     */
    public final TableField<IncidentsFilesRequestsRecord, Long> COUNT_REQUISITES_ENTERED = createField(DSL.name("count_requisites_entered"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "реквизитов обращений внесено");

    /**
     * The column
     * <code>metrics.incidents_files_requests.count_results_entered</code>.
     * результатов рассмотрения обращений внесено
     */
    public final TableField<IncidentsFilesRequestsRecord, Long> COUNT_RESULTS_ENTERED = createField(DSL.name("count_results_entered"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "результатов рассмотрения обращений внесено");

    /**
     * The column
     * <code>metrics.incidents_files_requests.count_formed_fns</code>. файлов
     * сформировано для выгрузки в ФНС
     */
    public final TableField<IncidentsFilesRequestsRecord, Long> COUNT_FORMED_FNS = createField(DSL.name("count_formed_fns"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "файлов сформировано для выгрузки в ФНС");

    /**
     * The column
     * <code>metrics.incidents_files_requests.count_uploaded_fns</code>. файлов
     * выгружено для ФНС
     */
    public final TableField<IncidentsFilesRequestsRecord, Long> COUNT_UPLOADED_FNS = createField(DSL.name("count_uploaded_fns"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "файлов выгружено для ФНС");

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

    private IncidentsFilesRequests(Name alias, Table<IncidentsFilesRequestsRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>metrics.incidents_files_requests</code> table
     * reference
     */
    public IncidentsFilesRequests(String alias) {
        this(DSL.name(alias), INCIDENTS_FILES_REQUESTS);
    }

    /**
     * Create an aliased <code>metrics.incidents_files_requests</code> table
     * reference
     */
    public IncidentsFilesRequests(Name alias) {
        this(alias, INCIDENTS_FILES_REQUESTS);
    }

    /**
     * Create a <code>metrics.incidents_files_requests</code> table reference
     */
    public IncidentsFilesRequests() {
        this(DSL.name("incidents_files_requests"), null);
    }

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

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

    @Override
    public UniqueKey<IncidentsFilesRequestsRecord> getPrimaryKey() {
        return Keys.INCIDENTS_FILES_REQUESTS_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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