/*
 * This file is generated by jOOQ.
 */
package ru.micord.ervu_dashboard.db_beans.appeals.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.appeals.Appeals;
import ru.micord.ervu_dashboard.db_beans.appeals.Keys;
import ru.micord.ervu_dashboard.db_beans.appeals.tables.records.AppealsListRecord;


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

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>appeals.appeals_list</code>
     */
    public static final AppealsList APPEALS_LIST = new AppealsList();

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

    /**
     * The column <code>appeals.appeals_list.number</code>. Номер
     */
    public final TableField<AppealsListRecord, Integer> NUMBER = createField(DSL.name("number"), SQLDataType.INTEGER.nullable(false), this, "Номер");

    /**
     * The column <code>appeals.appeals_list.source</code>. Источник
     */
    public final TableField<AppealsListRecord, String> SOURCE = createField(DSL.name("source"), SQLDataType.CLOB, this, "Источник");

    /**
     * The column <code>appeals.appeals_list.region</code>. Верхнеуровневый ЛКО
     */
    public final TableField<AppealsListRecord, String> REGION = createField(DSL.name("region"), SQLDataType.CLOB, this, "Верхнеуровневый ЛКО");

    /**
     * The column <code>appeals.appeals_list.category</code>. Категория
     */
    public final TableField<AppealsListRecord, String> CATEGORY = createField(DSL.name("category"), SQLDataType.CLOB, this, "Категория");

    /**
     * The column <code>appeals.appeals_list.subcategory</code>. Подкатегория
     */
    public final TableField<AppealsListRecord, String> SUBCATEGORY = createField(DSL.name("subcategory"), SQLDataType.CLOB, this, "Подкатегория");

    /**
     * The column <code>appeals.appeals_list.fact</code>. Факт
     */
    public final TableField<AppealsListRecord, String> FACT = createField(DSL.name("fact"), SQLDataType.CLOB, this, "Факт");

    /**
     * The column <code>appeals.appeals_list.incoming_date</code>. Дата
     * поступления
     */
    public final TableField<AppealsListRecord, String> INCOMING_DATE = createField(DSL.name("incoming_date"), SQLDataType.CLOB, this, "Дата поступления");

    /**
     * The column <code>appeals.appeals_list.plan_end_date</code>. Дата
     * планируемого завершения
     */
    public final TableField<AppealsListRecord, String> PLAN_END_DATE = createField(DSL.name("plan_end_date"), SQLDataType.CLOB, this, "Дата планируемого завершения");

    /**
     * The column <code>appeals.appeals_list.fact_end_date</code>. Дата
     * фактического завершения
     */
    public final TableField<AppealsListRecord, String> FACT_END_DATE = createField(DSL.name("fact_end_date"), SQLDataType.CLOB, this, "Дата фактического завершения");

    /**
     * The column <code>appeals.appeals_list.stage</code>. Стадия
     */
    public final TableField<AppealsListRecord, String> STAGE = createField(DSL.name("stage"), SQLDataType.CLOB, this, "Стадия");

    /**
     * The column <code>appeals.appeals_list.status</code>. Статус
     */
    public final TableField<AppealsListRecord, String> STATUS = createField(DSL.name("status"), SQLDataType.CLOB, this, "Статус");

    /**
     * The column <code>appeals.appeals_list.overdue</code>. Просрочено
     */
    public final TableField<AppealsListRecord, String> OVERDUE = createField(DSL.name("overdue"), SQLDataType.CLOB, this, "Просрочено");

    /**
     * The column <code>appeals.appeals_list.fz</code>. ФЗ
     */
    public final TableField<AppealsListRecord, String> FZ = createField(DSL.name("fz"), SQLDataType.CLOB, this, "ФЗ");

    /**
     * The column <code>appeals.appeals_list.solution_type</code>. Тип решения
     */
    public final TableField<AppealsListRecord, String> SOLUTION_TYPE = createField(DSL.name("solution_type"), SQLDataType.CLOB, this, "Тип решения");

    /**
     * The column <code>appeals.appeals_list.response_evalution</code>. Оценка
     * ответа заявителем
     */
    public final TableField<AppealsListRecord, String> RESPONSE_EVALUTION = createField(DSL.name("response_evalution"), SQLDataType.CLOB, this, "Оценка ответа заявителем");

    /**
     * The column <code>appeals.appeals_list.contractor_org</code>.
     * Организация-исполнитель
     */
    public final TableField<AppealsListRecord, String> CONTRACTOR_ORG = createField(DSL.name("contractor_org"), SQLDataType.CLOB, this, "Организация-исполнитель");

    /**
     * The column <code>appeals.appeals_list.region_id</code>. idm_id
     * региональных ВК (у которых schema = 'Organization')
     */
    public final TableField<AppealsListRecord, UUID> REGION_ID = createField(DSL.name("region_id"), SQLDataType.UUID, this, "idm_id региональных ВК (у которых schema = 'Organization')");

    /**
     * The column <code>appeals.appeals_list.system_esia_id</code>. ID ЕСИА
     */
    public final TableField<AppealsListRecord, String> SYSTEM_ESIA_ID = createField(DSL.name("system_esia_id"), SQLDataType.VARCHAR, this, "ID ЕСИА");

    /**
     * The column <code>appeals.appeals_list.upload_date</code>. Дата загрузки
     */
    public final TableField<AppealsListRecord, Timestamp> UPLOAD_DATE = createField(DSL.name("upload_date"), SQLDataType.TIMESTAMP(0), this, "Дата загрузки");

    /**
     * The column <code>appeals.appeals_list.region_processing</code>. Регион
     * обработки
     */
    public final TableField<AppealsListRecord, String> REGION_PROCESSING = createField(DSL.name("region_processing"), SQLDataType.VARCHAR, this, "Регион обработки");

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

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

    /**
     * Create an aliased <code>appeals.appeals_list</code> table reference
     */
    public AppealsList(String alias) {
        this(DSL.name(alias), APPEALS_LIST);
    }

    /**
     * Create an aliased <code>appeals.appeals_list</code> table reference
     */
    public AppealsList(Name alias) {
        this(alias, APPEALS_LIST);
    }

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

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

    @Override
    public UniqueKey<AppealsListRecord> getPrimaryKey() {
        return Keys.PK_APPEALS_LIST;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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