/*
 * 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.CitizenChildRecord;


/**
 * сведения о детях гражданина
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class CitizenChild extends TableImpl<CitizenChildRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ervu_dashboard.citizen_child</code>
     */
    public static final CitizenChild CITIZEN_CHILD = new CitizenChild();

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

    /**
     * The column <code>ervu_dashboard.citizen_child.citizen_child_id</code>.
     */
    public final TableField<CitizenChildRecord, Long> CITIZEN_CHILD_ID = createField(DSL.name("citizen_child_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

    /**
     * The column <code>ervu_dashboard.citizen_child.kinship_type</code>. тип
     * родственной связи: сын/дочь
     */
    public final TableField<CitizenChildRecord, String> KINSHIP_TYPE = createField(DSL.name("kinship_type"), SQLDataType.VARCHAR(50), this, "тип родственной связи: сын/дочь");

    /**
     * The column <code>ervu_dashboard.citizen_child.full_name</code>. ФИО
     */
    public final TableField<CitizenChildRecord, String> FULL_NAME = createField(DSL.name("full_name"), SQLDataType.VARCHAR, this, "ФИО");

    /**
     * The column <code>ervu_dashboard.citizen_child.birth_date</code>.
     */
    public final TableField<CitizenChildRecord, Date> BIRTH_DATE = createField(DSL.name("birth_date"), SQLDataType.DATE, this, "");

    /**
     * The column <code>ervu_dashboard.citizen_child.birth_az_number</code>.
     * номер актовой записи о рождении
     */
    public final TableField<CitizenChildRecord, String> BIRTH_AZ_NUMBER = createField(DSL.name("birth_az_number"), SQLDataType.VARCHAR(50), this, "номер актовой записи о рождении");

    /**
     * The column <code>ervu_dashboard.citizen_child.death_date</code>.
     */
    public final TableField<CitizenChildRecord, Date> DEATH_DATE = createField(DSL.name("death_date"), SQLDataType.DATE, this, "");

    /**
     * The column <code>ervu_dashboard.citizen_child.death_az_number</code>.
     * номер актовой записи о смерти
     */
    public final TableField<CitizenChildRecord, String> DEATH_AZ_NUMBER = createField(DSL.name("death_az_number"), SQLDataType.VARCHAR(50), this, "номер актовой записи о смерти");

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

    private CitizenChild(Name alias, Table<CitizenChildRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("сведения о детях гражданина"), TableOptions.table(), where);
    }

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

    /**
     * Create an aliased <code>ervu_dashboard.citizen_child</code> table
     * reference
     */
    public CitizenChild(Name alias) {
        this(alias, CITIZEN_CHILD);
    }

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

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

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

    @Override
    public UniqueKey<CitizenChildRecord> getPrimaryKey() {
        return Keys.PK_CITIZEN_CHILD;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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