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


import ervu_dashboard.ervu_dashboard.db_beans.public_.tables.PubRecruitment.PubRecruitmentPath;
import ervu_dashboard.ervu_dashboard.db_beans.ratings.Keys;
import ervu_dashboard.ervu_dashboard.db_beans.ratings.Ratings;
import ervu_dashboard.ervu_dashboard.db_beans.ratings.tables.records.ConsiderationComplaintRecord;
import ervu_dashboard.ervu_dashboard.db_beans.space.tables.Region.RegionPath;

import java.math.BigDecimal;
import java.sql.Date;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.UUID;

import org.jooq.Condition;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Identity;
import org.jooq.InverseForeignKey;
import org.jooq.Name;
import org.jooq.Path;
import org.jooq.PlainSQL;
import org.jooq.QueryPart;
import org.jooq.Record;
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;


/**
 * Рассмотрение жалоб уровень РФ
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ConsiderationComplaint extends TableImpl<ConsiderationComplaintRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ratings.consideration_complaint</code>
     */
    public static final ConsiderationComplaint CONSIDERATION_COMPLAINT = new ConsiderationComplaint();

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

    /**
     * The column
     * <code>ratings.consideration_complaint.id_consideration_complaint</code>.
     */
    public final TableField<ConsiderationComplaintRecord, Long> ID_CONSIDERATION_COMPLAINT = createField(DSL.name("id_consideration_complaint"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

    /**
     * The column <code>ratings.consideration_complaint.id_region</code>.
     */
    public final TableField<ConsiderationComplaintRecord, Integer> ID_REGION = createField(DSL.name("id_region"), SQLDataType.INTEGER, this, "");

    /**
     * The column
     * <code>ratings.consideration_complaint.consideration_complaint</code>.
     * Рассмотрение жалоб
     */
    public final TableField<ConsiderationComplaintRecord, BigDecimal> CONSIDERATION_COMPLAINT_ = createField(DSL.name("consideration_complaint"), SQLDataType.NUMERIC, this, "Рассмотрение жалоб");

    /**
     * The column <code>ratings.consideration_complaint.recording_date</code>.
     * Дата записи
     */
    public final TableField<ConsiderationComplaintRecord, Date> RECORDING_DATE = createField(DSL.name("recording_date"), SQLDataType.DATE, this, "Дата записи");

    /**
     * The column
     * <code>ratings.consideration_complaint.consideration_complaint_percent</code>.
     * Рассмотрение жалоб в процентах
     */
    public final TableField<ConsiderationComplaintRecord, BigDecimal> CONSIDERATION_COMPLAINT_PERCENT = createField(DSL.name("consideration_complaint_percent"), SQLDataType.NUMERIC, this, "Рассмотрение жалоб в процентах");

    /**
     * The column <code>ratings.consideration_complaint.recruitment_id</code>.
     */
    public final TableField<ConsiderationComplaintRecord, UUID> RECRUITMENT_ID = createField(DSL.name("recruitment_id"), SQLDataType.UUID, this, "");

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

    private ConsiderationComplaint(Name alias, Table<ConsiderationComplaintRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Рассмотрение жалоб уровень РФ"), TableOptions.table(), where);
    }

    /**
     * Create an aliased <code>ratings.consideration_complaint</code> table
     * reference
     */
    public ConsiderationComplaint(String alias) {
        this(DSL.name(alias), CONSIDERATION_COMPLAINT);
    }

    /**
     * Create an aliased <code>ratings.consideration_complaint</code> table
     * reference
     */
    public ConsiderationComplaint(Name alias) {
        this(alias, CONSIDERATION_COMPLAINT);
    }

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

    public <O extends Record> ConsiderationComplaint(Table<O> path, ForeignKey<O, ConsiderationComplaintRecord> childPath, InverseForeignKey<O, ConsiderationComplaintRecord> parentPath) {
        super(path, childPath, parentPath, CONSIDERATION_COMPLAINT);
    }

    /**
     * A subtype implementing {@link Path} for simplified path-based joins.
     */
    public static class ConsiderationComplaintPath extends ConsiderationComplaint implements Path<ConsiderationComplaintRecord> {
        public <O extends Record> ConsiderationComplaintPath(Table<O> path, ForeignKey<O, ConsiderationComplaintRecord> childPath, InverseForeignKey<O, ConsiderationComplaintRecord> parentPath) {
            super(path, childPath, parentPath);
        }
        private ConsiderationComplaintPath(Name alias, Table<ConsiderationComplaintRecord> aliased) {
            super(alias, aliased);
        }

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

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

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

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

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

    @Override
    public UniqueKey<ConsiderationComplaintRecord> getPrimaryKey() {
        return Keys.PK_CONSIDERATION_COMPLAINT;
    }

    @Override
    public List<ForeignKey<ConsiderationComplaintRecord, ?>> getReferences() {
        return Arrays.asList(Keys.CONSIDERATION_COMPLAINT__FK_REGION, Keys.CONSIDERATION_COMPLAINT__CONSIDERATION_COMPLAINT_FK1);
    }

    private transient RegionPath _region;

    /**
     * Get the implicit join path to the <code>space.region</code> table.
     */
    public RegionPath region() {
        if (_region == null)
            _region = new RegionPath(this, Keys.CONSIDERATION_COMPLAINT__FK_REGION, null);

        return _region;
    }

    private transient PubRecruitmentPath _pubRecruitment;

    /**
     * Get the implicit join path to the <code>public.pub_recruitment</code>
     * table.
     */
    public PubRecruitmentPath pubRecruitment() {
        if (_pubRecruitment == null)
            _pubRecruitment = new PubRecruitmentPath(this, Keys.CONSIDERATION_COMPLAINT__CONSIDERATION_COMPLAINT_FK1, null);

        return _pubRecruitment;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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