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


/**
 * Администрирование. Анализ времени активности сервисов
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ActiveServiceTime extends TableImpl<ActiveServiceTimeRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>admin_indicators.active_service_time</code>
     */
    public static final ActiveServiceTime ACTIVE_SERVICE_TIME = new ActiveServiceTime();

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

    /**
     * The column
     * <code>admin_indicators.active_service_time.active_service_time_id</code>.
     */
    public final TableField<ActiveServiceTimeRecord, Long> ACTIVE_SERVICE_TIME_ID = createField(DSL.name("active_service_time_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

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

    /**
     * The column
     * <code>admin_indicators.active_service_time.count_convert</code>.
     * конвертация
     */
    public final TableField<ActiveServiceTimeRecord, Long> COUNT_CONVERT = createField(DSL.name("count_convert"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "конвертация");

    /**
     * The column
     * <code>admin_indicators.active_service_time.count_init_registration</code>.
     * постановка на ву
     */
    public final TableField<ActiveServiceTimeRecord, Long> COUNT_INIT_REGISTRATION = createField(DSL.name("count_init_registration"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "постановка на ву");

    /**
     * The column
     * <code>admin_indicators.active_service_time.count_deregistration</code>.
     * снятие с ву
     */
    public final TableField<ActiveServiceTimeRecord, Long> COUNT_DEREGISTRATION = createField(DSL.name("count_deregistration"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "снятие с ву");

    /**
     * The column
     * <code>admin_indicators.active_service_time.count_summonses_list_access</code>.
     * доступ в Реестр повесток
     */
    public final TableField<ActiveServiceTimeRecord, Long> COUNT_SUMMONSES_LIST_ACCESS = createField(DSL.name("count_summonses_list_access"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "доступ в Реестр повесток");

    /**
     * The column
     * <code>admin_indicators.active_service_time.count_actualization</code>.
     * актуализация сведений
     */
    public final TableField<ActiveServiceTimeRecord, Long> COUNT_ACTUALIZATION = createField(DSL.name("count_actualization"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "актуализация сведений");

    /**
     * The column
     * <code>admin_indicators.active_service_time.count_responsibility_info</code>.
     * внесение сведений об ответственности
     */
    public final TableField<ActiveServiceTimeRecord, Long> COUNT_RESPONSIBILITY_INFO = createField(DSL.name("count_responsibility_info"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "внесение сведений об ответственности");

    /**
     * The column
     * <code>admin_indicators.active_service_time.average_count_convert</code>.
     * среднее время конвертация
     */
    public final TableField<ActiveServiceTimeRecord, Long> AVERAGE_COUNT_CONVERT = createField(DSL.name("average_count_convert"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "среднее время конвертация");

    /**
     * The column
     * <code>admin_indicators.active_service_time.average_count_init_registration</code>.
     * среднее время постановка на ву
     */
    public final TableField<ActiveServiceTimeRecord, Long> AVERAGE_COUNT_INIT_REGISTRATION = createField(DSL.name("average_count_init_registration"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "среднее время постановка на ву");

    /**
     * The column
     * <code>admin_indicators.active_service_time.average_count_deregistration</code>.
     * среднее время снятие с ву
     */
    public final TableField<ActiveServiceTimeRecord, Long> AVERAGE_COUNT_DEREGISTRATION = createField(DSL.name("average_count_deregistration"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "среднее время снятие с ву");

    /**
     * The column
     * <code>admin_indicators.active_service_time.average_count_summonses_list_access</code>.
     * среднее время доступ в Реестр повесток
     */
    public final TableField<ActiveServiceTimeRecord, Long> AVERAGE_COUNT_SUMMONSES_LIST_ACCESS = createField(DSL.name("average_count_summonses_list_access"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "среднее время доступ в Реестр повесток");

    /**
     * The column
     * <code>admin_indicators.active_service_time.average_count_actualization</code>.
     * среднее время актуализация сведений
     */
    public final TableField<ActiveServiceTimeRecord, Long> AVERAGE_COUNT_ACTUALIZATION = createField(DSL.name("average_count_actualization"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "среднее время актуализация сведений");

    /**
     * The column
     * <code>admin_indicators.active_service_time.average_count_responsibility_info</code>.
     * среднее время внесение сведений об ответственности
     */
    public final TableField<ActiveServiceTimeRecord, Long> AVERAGE_COUNT_RESPONSIBILITY_INFO = createField(DSL.name("average_count_responsibility_info"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "среднее время внесение сведений об ответственности");

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

    private ActiveServiceTime(Name alias, Table<ActiveServiceTimeRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Администрирование. Анализ времени активности сервисов"), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>admin_indicators.active_service_time</code> table
     * reference
     */
    public ActiveServiceTime(String alias) {
        this(DSL.name(alias), ACTIVE_SERVICE_TIME);
    }

    /**
     * Create an aliased <code>admin_indicators.active_service_time</code> table
     * reference
     */
    public ActiveServiceTime(Name alias) {
        this(alias, ACTIVE_SERVICE_TIME);
    }

    /**
     * Create a <code>admin_indicators.active_service_time</code> table
     * reference
     */
    public ActiveServiceTime() {
        this(DSL.name("active_service_time"), null);
    }

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

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

    @Override
    public UniqueKey<ActiveServiceTimeRecord> getPrimaryKey() {
        return Keys.ACTIVE_SERVICE_TIME_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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