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


/**
 * Журналирование. Направление уведомлений на ЕПГУ
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class EpguNoticeSent extends TableImpl<EpguNoticeSentRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>journal_log.epgu_notice_sent</code>
     */
    public static final EpguNoticeSent EPGU_NOTICE_SENT = new EpguNoticeSent();

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

    /**
     * The column <code>journal_log.epgu_notice_sent.epgu_notice_sent_id</code>.
     */
    public final TableField<EpguNoticeSentRecord, Long> EPGU_NOTICE_SENT_ID = createField(DSL.name("epgu_notice_sent_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

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

    /**
     * The column <code>journal_log.epgu_notice_sent.count_notice_1</code>.
     */
    public final TableField<EpguNoticeSentRecord, Long> COUNT_NOTICE_1 = createField(DSL.name("count_notice_1"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column <code>journal_log.epgu_notice_sent.count_notice_2</code>.
     */
    public final TableField<EpguNoticeSentRecord, Long> COUNT_NOTICE_2 = createField(DSL.name("count_notice_2"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column <code>journal_log.epgu_notice_sent.count_notice_3</code>.
     */
    public final TableField<EpguNoticeSentRecord, Long> COUNT_NOTICE_3 = createField(DSL.name("count_notice_3"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column <code>journal_log.epgu_notice_sent.count_notice_4</code>.
     */
    public final TableField<EpguNoticeSentRecord, Long> COUNT_NOTICE_4 = createField(DSL.name("count_notice_4"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");

    /**
     * The column <code>journal_log.epgu_notice_sent.notice_name_1</code>.
     */
    public final TableField<EpguNoticeSentRecord, String> NOTICE_NAME_1 = createField(DSL.name("notice_name_1"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>journal_log.epgu_notice_sent.notice_name_2</code>.
     */
    public final TableField<EpguNoticeSentRecord, String> NOTICE_NAME_2 = createField(DSL.name("notice_name_2"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>journal_log.epgu_notice_sent.notice_name_3</code>.
     */
    public final TableField<EpguNoticeSentRecord, String> NOTICE_NAME_3 = createField(DSL.name("notice_name_3"), SQLDataType.VARCHAR.nullable(false), this, "");

    /**
     * The column <code>journal_log.epgu_notice_sent.notice_name_4</code>.
     */
    public final TableField<EpguNoticeSentRecord, String> NOTICE_NAME_4 = createField(DSL.name("notice_name_4"), SQLDataType.VARCHAR.nullable(false), this, "");

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

    private EpguNoticeSent(Name alias, Table<EpguNoticeSentRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Журналирование. Направление уведомлений на ЕПГУ"), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>journal_log.epgu_notice_sent</code> table
     * reference
     */
    public EpguNoticeSent(String alias) {
        this(DSL.name(alias), EPGU_NOTICE_SENT);
    }

    /**
     * Create an aliased <code>journal_log.epgu_notice_sent</code> table
     * reference
     */
    public EpguNoticeSent(Name alias) {
        this(alias, EPGU_NOTICE_SENT);
    }

    /**
     * Create a <code>journal_log.epgu_notice_sent</code> table reference
     */
    public EpguNoticeSent() {
        this(DSL.name("epgu_notice_sent"), null);
    }

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

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

    @Override
    public UniqueKey<EpguNoticeSentRecord> getPrimaryKey() {
        return Keys.EPGU_NOTICE_SENT_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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