/*
 * This file is generated by jOOQ.
 */
package ru.micord.ervu.account_applications.db_beans.public_.tables;


import java.sql.Timestamp;
import java.util.Collection;
import java.util.UUID;

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.ervu.account_applications.db_beans.public_.Keys;
import ru.micord.ervu.account_applications.db_beans.public_.Public;
import ru.micord.ervu.account_applications.db_beans.public_.tables.records.UserApplicationListAuditRecord;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>public.user_application_list_audit</code>
     */
    public static final UserApplicationListAudit USER_APPLICATION_LIST_AUDIT = new UserApplicationListAudit();

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

    /**
     * The column <code>public.user_application_list_audit.id</code>.
     */
    public final TableField<UserApplicationListAuditRecord, UUID> ID = createField(DSL.name("id"), SQLDataType.UUID.nullable(false).defaultValue(DSL.field(DSL.raw("uuid_generate_v4()"), SQLDataType.UUID)), this, "");

    /**
     * The column
     * <code>public.user_application_list_audit.user_application_list_id</code>.
     */
    public final TableField<UserApplicationListAuditRecord, Long> USER_APPLICATION_LIST_ID = createField(DSL.name("user_application_list_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>public.user_application_list_audit.date</code>.
     */
    public final TableField<UserApplicationListAuditRecord, Timestamp> DATE = createField(DSL.name("date"), SQLDataType.TIMESTAMP(0).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.TIMESTAMP)), this, "");

    /**
     * The column <code>public.user_application_list_audit.status</code>.
     */
    public final TableField<UserApplicationListAuditRecord, String> STATUS = createField(DSL.name("status"), SQLDataType.VARCHAR(100), this, "");

    /**
     * The column <code>public.user_application_list_audit.fio</code>.
     */
    public final TableField<UserApplicationListAuditRecord, String> FIO = createField(DSL.name("fio"), SQLDataType.VARCHAR(1000), this, "");

    /**
     * The column <code>public.user_application_list_audit.login</code>.
     */
    public final TableField<UserApplicationListAuditRecord, String> LOGIN = createField(DSL.name("login"), SQLDataType.VARCHAR(1000), this, "");

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

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

    /**
     * Create an aliased <code>public.user_application_list_audit</code> table
     * reference
     */
    public UserApplicationListAudit(String alias) {
        this(DSL.name(alias), USER_APPLICATION_LIST_AUDIT);
    }

    /**
     * Create an aliased <code>public.user_application_list_audit</code> table
     * reference
     */
    public UserApplicationListAudit(Name alias) {
        this(alias, USER_APPLICATION_LIST_AUDIT);
    }

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

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

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

    @Override
    public UniqueKey<UserApplicationListAuditRecord> getPrimaryKey() {
        return Keys.USER_APPLICATION_LIST_AUDIT_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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