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


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.ervu_dashboard.ErvuDashboard;
import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.Keys;
import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.tables.records.CitizenLiabilityFz53Record;


/**
 * Административная ответственность  в связи с нарушением ФЗ-53
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class CitizenLiabilityFz53 extends TableImpl<CitizenLiabilityFz53Record> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of
     * <code>ervu_dashboard.citizen_liability_fz53</code>
     */
    public static final CitizenLiabilityFz53 CITIZEN_LIABILITY_FZ53 = new CitizenLiabilityFz53();

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

    /**
     * The column
     * <code>ervu_dashboard.citizen_liability_fz53.citizen_liability_fz53_id</code>.
     */
    public final TableField<CitizenLiabilityFz53Record, Long> CITIZEN_LIABILITY_FZ53_ID = createField(DSL.name("citizen_liability_fz53_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

    /**
     * The column
     * <code>ervu_dashboard.citizen_liability_fz53.fact_bringing</code>. Факт
     * привлечения к административной ответственности
     */
    public final TableField<CitizenLiabilityFz53Record, String> FACT_BRINGING = createField(DSL.name("fact_bringing"), SQLDataType.VARCHAR, this, "Факт привлечения к административной ответственности");

    /**
     * The column
     * <code>ervu_dashboard.citizen_liability_fz53.case_number_before</code>.
     * Номер дела об административном правонарушении (досудебный)
     */
    public final TableField<CitizenLiabilityFz53Record, String> CASE_NUMBER_BEFORE = createField(DSL.name("case_number_before"), SQLDataType.VARCHAR, this, "Номер дела об административном правонарушении (досудебный)");

    /**
     * The column
     * <code>ervu_dashboard.citizen_liability_fz53.date_initiation</code>. Дата
     * возбуждения дела об административном правонарушении
     */
    public final TableField<CitizenLiabilityFz53Record, Date> DATE_INITIATION = createField(DSL.name("date_initiation"), SQLDataType.DATE, this, "Дата возбуждения дела об административном правонарушении");

    /**
     * The column
     * <code>ervu_dashboard.citizen_liability_fz53.body_initiated</code>. Орган,
     * возбудивший дело об административном правонарушении
     */
    public final TableField<CitizenLiabilityFz53Record, String> BODY_INITIATED = createField(DSL.name("body_initiated"), SQLDataType.VARCHAR, this, "Орган, возбудивший дело об административном правонарушении");

    /**
     * The column
     * <code>ervu_dashboard.citizen_liability_fz53.case_number</code>. Номер
     * дела об административном правонарушении
     */
    public final TableField<CitizenLiabilityFz53Record, String> CASE_NUMBER = createField(DSL.name("case_number"), SQLDataType.VARCHAR, this, "Номер дела об административном правонарушении");

    /**
     * The column
     * <code>ervu_dashboard.citizen_liability_fz53.date_resolution</code>. Дата
     * постановления
     */
    public final TableField<CitizenLiabilityFz53Record, Date> DATE_RESOLUTION = createField(DSL.name("date_resolution"), SQLDataType.DATE, this, "Дата постановления");

    /**
     * The column
     * <code>ervu_dashboard.citizen_liability_fz53.article_koap_rf</code>.
     * Пункт, часть, статья КоАП РФ
     */
    public final TableField<CitizenLiabilityFz53Record, String> ARTICLE_KOAP_RF = createField(DSL.name("article_koap_rf"), SQLDataType.VARCHAR, this, "Пункт, часть, статья КоАП РФ");

    /**
     * The column
     * <code>ervu_dashboard.citizen_liability_fz53.court_decision</code>. Суд,
     * вынесший постановление
     */
    public final TableField<CitizenLiabilityFz53Record, String> COURT_DECISION = createField(DSL.name("court_decision"), SQLDataType.VARCHAR, this, "Суд, вынесший постановление");

    /**
     * The column <code>ervu_dashboard.citizen_liability_fz53.name_vc</code>.
     * Военкомат, принявший решение о применении мер
     */
    public final TableField<CitizenLiabilityFz53Record, String> NAME_VC = createField(DSL.name("name_vc"), SQLDataType.VARCHAR, this, "Военкомат, принявший решение о применении мер");

    /**
     * The column <code>ervu_dashboard.citizen_liability_fz53.reason_use</code>.
     * Причина применения
     */
    public final TableField<CitizenLiabilityFz53Record, String> REASON_USE = createField(DSL.name("reason_use"), SQLDataType.VARCHAR, this, "Причина применения");

    /**
     * The column <code>ervu_dashboard.citizen_liability_fz53.start_date</code>.
     * Дата, с которой наложена мера
     */
    public final TableField<CitizenLiabilityFz53Record, Date> START_DATE = createField(DSL.name("start_date"), SQLDataType.DATE, this, "Дата, с которой наложена мера");

    /**
     * The column
     * <code>ervu_dashboard.citizen_liability_fz53.type_punishment</code>. Вид
     * наказания
     */
    public final TableField<CitizenLiabilityFz53Record, String> TYPE_PUNISHMENT = createField(DSL.name("type_punishment"), SQLDataType.VARCHAR, this, "Вид наказания");

    /**
     * The column
     * <code>ervu_dashboard.citizen_liability_fz53.size_term_punishment</code>.
     * Размер и срок наказания
     */
    public final TableField<CitizenLiabilityFz53Record, String> SIZE_TERM_PUNISHMENT = createField(DSL.name("size_term_punishment"), SQLDataType.VARCHAR, this, "Размер и срок наказания");

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

    private CitizenLiabilityFz53(Name alias, Table<CitizenLiabilityFz53Record> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("Административная ответственность  в связи с нарушением ФЗ-53"), TableOptions.table(), where);
    }

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

    /**
     * Create an aliased <code>ervu_dashboard.citizen_liability_fz53</code>
     * table reference
     */
    public CitizenLiabilityFz53(Name alias) {
        this(alias, CITIZEN_LIABILITY_FZ53);
    }

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

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

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

    @Override
    public UniqueKey<CitizenLiabilityFz53Record> getPrimaryKey() {
        return Keys.PK_CITIZEN_LIABILITY_FZ53;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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