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


/**
 * Конвертация. Доставка уведомлений в ЛК на ЕПГУ
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ConvertInfoSentToLkEpgu extends TableImpl<ConvertInfoSentToLkEpguRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>metrics.convert_info_sent_to_lk_epgu</code>
     */
    public static final ConvertInfoSentToLkEpgu CONVERT_INFO_SENT_TO_LK_EPGU = new ConvertInfoSentToLkEpgu();

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

    /**
     * The column
     * <code>metrics.convert_info_sent_to_lk_epgu.convert_info_sent_to_lk_epgu_id</code>.
     */
    public final TableField<ConvertInfoSentToLkEpguRecord, Long> CONVERT_INFO_SENT_TO_LK_EPGU_ID = createField(DSL.name("convert_info_sent_to_lk_epgu_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

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

    /**
     * The column
     * <code>metrics.convert_info_sent_to_lk_epgu.count_status_formed</code>.
     */
    public final TableField<ConvertInfoSentToLkEpguRecord, Long> COUNT_STATUS_FORMED = createField(DSL.name("count_status_formed"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column
     * <code>metrics.convert_info_sent_to_lk_epgu.count_sended</code>.
     */
    public final TableField<ConvertInfoSentToLkEpguRecord, Long> COUNT_SENDED = createField(DSL.name("count_sended"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column
     * <code>metrics.convert_info_sent_to_lk_epgu.count_delivered</code>.
     */
    public final TableField<ConvertInfoSentToLkEpguRecord, Long> COUNT_DELIVERED = createField(DSL.name("count_delivered"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column <code>metrics.convert_info_sent_to_lk_epgu.count_error</code>.
     */
    public final TableField<ConvertInfoSentToLkEpguRecord, Long> COUNT_ERROR = createField(DSL.name("count_error"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column
     * <code>metrics.convert_info_sent_to_lk_epgu.count_viewed</code>.
     */
    public final TableField<ConvertInfoSentToLkEpguRecord, Long> COUNT_VIEWED = createField(DSL.name("count_viewed"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column
     * <code>metrics.convert_info_sent_to_lk_epgu.count_not_viewed</code>.
     */
    public final TableField<ConvertInfoSentToLkEpguRecord, Long> COUNT_NOT_VIEWED = createField(DSL.name("count_not_viewed"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column
     * <code>metrics.convert_info_sent_to_lk_epgu.count_status_not_formed</code>.
     */
    public final TableField<ConvertInfoSentToLkEpguRecord, Long> COUNT_STATUS_NOT_FORMED = createField(DSL.name("count_status_not_formed"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column
     * <code>metrics.convert_info_sent_to_lk_epgu.count_exceeded_send</code>.
     * Превышено время ожидания отправки уведомления
     */
    public final TableField<ConvertInfoSentToLkEpguRecord, Long> COUNT_EXCEEDED_SEND = createField(DSL.name("count_exceeded_send"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "Превышено время ожидания отправки уведомления");

    /**
     * The column
     * <code>metrics.convert_info_sent_to_lk_epgu.count_exceeded_delivered</code>.
     * Превышено время ожидания доставки уведомления
     */
    public final TableField<ConvertInfoSentToLkEpguRecord, Long> COUNT_EXCEEDED_DELIVERED = createField(DSL.name("count_exceeded_delivered"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "Превышено время ожидания доставки уведомления");

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

    private ConvertInfoSentToLkEpgu(Name alias, Table<ConvertInfoSentToLkEpguRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Конвертация. Доставка уведомлений в ЛК на ЕПГУ"), TableOptions.table(), where);
    }

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

    /**
     * Create an aliased <code>metrics.convert_info_sent_to_lk_epgu</code> table
     * reference
     */
    public ConvertInfoSentToLkEpgu(Name alias) {
        this(alias, CONVERT_INFO_SENT_TO_LK_EPGU);
    }

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

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

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

    @Override
    public UniqueKey<ConvertInfoSentToLkEpguRecord> getPrimaryKey() {
        return Keys.CONVERT_INFO_SENT_TO_LK_EPGU_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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