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


import java.math.BigDecimal;
import java.sql.Date;
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_dashboard.db_beans.appeals.Appeals;
import ru.micord.ervu_dashboard.db_beans.appeals.Keys;
import ru.micord.ervu_dashboard.db_beans.appeals.tables.records.ReviewProgressRecord;


/**
 * Ход рассмотрения
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ReviewProgress extends TableImpl<ReviewProgressRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>appeals.review_progress</code>
     */
    public static final ReviewProgress REVIEW_PROGRESS = new ReviewProgress();

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

    /**
     * The column <code>appeals.review_progress.id_review_progress</code>.
     */
    public final TableField<ReviewProgressRecord, Long> ID_REVIEW_PROGRESS = createField(DSL.name("id_review_progress"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>appeals.review_progress.recruitment_id</code>.
     */
    public final TableField<ReviewProgressRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID.nullable(false), this, "");

    /**
     * The column <code>appeals.review_progress.schema</code>.
     */
    public final TableField<ReviewProgressRecord, String> SCHEMA = createField(DSL.name("schema"), SQLDataType.VARCHAR(64).nullable(false).defaultValue(DSL.field(DSL.raw("'empty'::character varying"), SQLDataType.VARCHAR)), this, "");

    /**
     * The column <code>appeals.review_progress.recording_date</code>.
     */
    public final TableField<ReviewProgressRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE.nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.DATE)), this, "");

    /**
     * The column <code>appeals.review_progress.in_work</code>. в работе
     */
    public final TableField<ReviewProgressRecord, BigDecimal> IN_WORK = createField(DSL.name("in_work"), SQLDataType.NUMERIC, this, "в работе");

    /**
     * The column <code>appeals.review_progress.decided</code>. решено
     */
    public final TableField<ReviewProgressRecord, BigDecimal> DECIDED = createField(DSL.name("decided"), SQLDataType.NUMERIC, this, "решено");

    /**
     * The column <code>appeals.review_progress.revoked</code>. отозвано
     */
    public final TableField<ReviewProgressRecord, BigDecimal> REVOKED = createField(DSL.name("revoked"), SQLDataType.NUMERIC, this, "отозвано");

    /**
     * The column <code>appeals.review_progress.in_work_percent</code>.
     */
    public final TableField<ReviewProgressRecord, BigDecimal> IN_WORK_PERCENT = createField(DSL.name("in_work_percent"), SQLDataType.NUMERIC, this, "");

    /**
     * The column <code>appeals.review_progress.decided_percent</code>.
     */
    public final TableField<ReviewProgressRecord, BigDecimal> DECIDED_PERCENT = createField(DSL.name("decided_percent"), SQLDataType.NUMERIC, this, "");

    /**
     * The column <code>appeals.review_progress.revoked_percent</code>.
     */
    public final TableField<ReviewProgressRecord, BigDecimal> REVOKED_PERCENT = createField(DSL.name("revoked_percent"), SQLDataType.NUMERIC, this, "");

    /**
     * The column <code>appeals.review_progress.total_appeals</code>.
     */
    public final TableField<ReviewProgressRecord, BigDecimal> TOTAL_APPEALS = createField(DSL.name("total_appeals"), SQLDataType.NUMERIC, this, "");

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

    private ReviewProgress(Name alias, Table<ReviewProgressRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Ход рассмотрения"), TableOptions.table(), where);
    }

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

    /**
     * Create an aliased <code>appeals.review_progress</code> table reference
     */
    public ReviewProgress(Name alias) {
        this(alias, REVIEW_PROGRESS);
    }

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

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

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

    @Override
    public UniqueKey<ReviewProgressRecord> getPrimaryKey() {
        return Keys.REVIEW_PROGRESS_PKEY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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