/*
 * This file is generated by jOOQ.
 */
package ru.micord.ervu_dashboard.db_beans.ervu_dashboard.tables;


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

import org.jooq.Condition;
import org.jooq.Field;
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_dashboard.db_beans.ervu_dashboard.ErvuDashboard;
import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.Keys;
import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.tables.records.CitizenIncidentRecord;


/**
 * Сведения об инцидентах качества данных
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class CitizenIncident extends TableImpl<CitizenIncidentRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ervu_dashboard.citizen_incident</code>
     */
    public static final CitizenIncident CITIZEN_INCIDENT = new CitizenIncident();

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

    /**
     * The column
     * <code>ervu_dashboard.citizen_incident.citizen_incident_id</code>.
     */
    public final TableField<CitizenIncidentRecord, UUID> CITIZEN_INCIDENT_ID = createField(DSL.name("citizen_incident_id"), SQLDataType.UUID.nullable(false), this, "");

    /**
     * The column <code>ervu_dashboard.citizen_incident.recruit_id</code>.
     * ссылка на гражданина (citizen)
     */
    public final TableField<CitizenIncidentRecord, UUID> RECRUIT_ID = createField(DSL.name("recruit_id"), SQLDataType.UUID.nullable(false), this, "ссылка на гражданина (citizen)");

    /**
     * The column <code>ervu_dashboard.citizen_incident.incident_type</code>.
     * Тип инцидента качества данных
     */
    public final TableField<CitizenIncidentRecord, String> INCIDENT_TYPE = createField(DSL.name("incident_type"), SQLDataType.VARCHAR, this, "Тип инцидента качества данных");

    /**
     * The column <code>ervu_dashboard.citizen_incident.data_type</code>. Тип
     * данных качества данных
     */
    public final TableField<CitizenIncidentRecord, String> DATA_TYPE = createField(DSL.name("data_type"), SQLDataType.VARCHAR, this, "Тип данных качества данных");

    /**
     * The column <code>ervu_dashboard.citizen_incident.number_incident</code>.
     * Номер инцидента качества данных
     */
    public final TableField<CitizenIncidentRecord, String> NUMBER_INCIDENT = createField(DSL.name("number_incident"), SQLDataType.VARCHAR, this, "Номер инцидента качества данных");

    /**
     * The column <code>ervu_dashboard.citizen_incident.date_incident</code>.
     * Дата обращения о наличии инцидента качества данных
     */
    public final TableField<CitizenIncidentRecord, Timestamp> DATE_INCIDENT = createField(DSL.name("date_incident"), SQLDataType.TIMESTAMP(0), this, "Дата обращения о наличии инцидента качества данных");

    /**
     * The column <code>ervu_dashboard.citizen_incident.decision_date</code>.
     * Дата принятия решения в отношении инцидента качества данных
     */
    public final TableField<CitizenIncidentRecord, Timestamp> DECISION_DATE = createField(DSL.name("decision_date"), SQLDataType.TIMESTAMP(0), this, "Дата принятия решения в отношении инцидента качества данных");

    /**
     * The column
     * <code>ervu_dashboard.citizen_incident.result_consideration</code>.
     * Результат рассмотрения обращения о наличии инцидента качества данных
     */
    public final TableField<CitizenIncidentRecord, String> RESULT_CONSIDERATION = createField(DSL.name("result_consideration"), SQLDataType.VARCHAR, this, "Результат рассмотрения обращения о наличии инцидента качества данных");

    /**
     * The column <code>ervu_dashboard.citizen_incident.name_body</code>.
     * Наименование органа, принявшего решение по инциденту качества данных
     */
    public final TableField<CitizenIncidentRecord, String> NAME_BODY = createField(DSL.name("name_body"), SQLDataType.VARCHAR, this, "Наименование органа, принявшего решение по инциденту качества данных");

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

    private CitizenIncident(Name alias, Table<CitizenIncidentRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Сведения об инцидентах качества данных"), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>ervu_dashboard.citizen_incident</code> table
     * reference
     */
    public CitizenIncident(String alias) {
        this(DSL.name(alias), CITIZEN_INCIDENT);
    }

    /**
     * Create an aliased <code>ervu_dashboard.citizen_incident</code> table
     * reference
     */
    public CitizenIncident(Name alias) {
        this(alias, CITIZEN_INCIDENT);
    }

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

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

    @Override
    public UniqueKey<CitizenIncidentRecord> getPrimaryKey() {
        return Keys.PK_CITIZEN_INCIDENT;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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