/*
 * 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.enums.TypePropertyType;
import ru.micord.ervu_dashboard.db_beans.ervu_dashboard.tables.records.PropertyRecord;


/**
 * сведения об имуществе
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Property extends TableImpl<PropertyRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * The reference instance of <code>ervu_dashboard.property</code>
     */
    public static final Property PROPERTY = new Property();

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

    /**
     * The column <code>ervu_dashboard.property.property_id</code>.
     */
    public final TableField<PropertyRecord, Long> PROPERTY_ID = createField(DSL.name("property_id"), SQLDataType.BIGINT.nullable(false).identity(true), this, "");

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

    /**
     * The column <code>ervu_dashboard.property.type_property</code>. тип
     * имущества: недвижимое/наземный/воздушный/водный транспорт
     */
    public final TableField<PropertyRecord, TypePropertyType> TYPE_PROPERTY = createField(DSL.name("type_property"), SQLDataType.VARCHAR.asEnumDataType(TypePropertyType.class), this, "тип имущества: недвижимое/наземный/воздушный/водный транспорт");

    /**
     * The column <code>ervu_dashboard.property.start_date</code>. дата
     * регистрации права владения
     */
    public final TableField<PropertyRecord, Date> START_DATE = createField(DSL.name("start_date"), SQLDataType.DATE, this, "дата регистрации права владения");

    /**
     * The column <code>ervu_dashboard.property.close_date</code>. дата
     * прекращения права владения
     */
    public final TableField<PropertyRecord, Date> CLOSE_DATE = createField(DSL.name("close_date"), SQLDataType.DATE, this, "дата прекращения права владения");

    /**
     * The column <code>ervu_dashboard.property.vehicle_type</code>. вид
     * транспортного средства
     */
    public final TableField<PropertyRecord, String> VEHICLE_TYPE = createField(DSL.name("vehicle_type"), SQLDataType.CLOB, this, "вид транспортного средства");

    /**
     * The column <code>ervu_dashboard.property.vehicle_category</code>.
     * категория транспортного средства
     */
    public final TableField<PropertyRecord, String> VEHICLE_CATEGORY = createField(DSL.name("vehicle_category"), SQLDataType.CLOB, this, "категория транспортного средства");

    /**
     * The column <code>ervu_dashboard.property.address</code>. адрес объекта
     * недвижимости
     */
    public final TableField<PropertyRecord, String> ADDRESS = createField(DSL.name("address"), SQLDataType.CLOB, this, "адрес объекта недвижимости");

    /**
     * The column <code>ervu_dashboard.property.kind_right</code>. вид права
     */
    public final TableField<PropertyRecord, String> KIND_RIGHT = createField(DSL.name("kind_right"), SQLDataType.CLOB, this, "вид права");

    /**
     * The column <code>ervu_dashboard.property.issue_year</code>. год выпуска
     * транспортного средства
     */
    public final TableField<PropertyRecord, String> ISSUE_YEAR = createField(DSL.name("issue_year"), SQLDataType.CLOB, this, "год выпуска транспортного средства");

    /**
     * The column <code>ervu_dashboard.property.brand_model</code>. марка,
     * модель транспортного средства
     */
    public final TableField<PropertyRecord, String> BRAND_MODEL = createField(DSL.name("brand_model"), SQLDataType.CLOB, this, "марка, модель транспортного средства");

    /**
     * The column <code>ervu_dashboard.property.reg_plate</code>.
     * регистрационный номер
     */
    public final TableField<PropertyRecord, String> REG_PLATE = createField(DSL.name("reg_plate"), SQLDataType.CLOB, this, "регистрационный номер");

    /**
     * The column <code>ervu_dashboard.property.vin</code>.
     */
    public final TableField<PropertyRecord, String> VIN = createField(DSL.name("vin"), SQLDataType.CLOB, this, "");

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

    private Property(Name alias, Table<PropertyRecord> aliased, Field<?>[] parameters, Condition where) {
        super(alias, null, aliased, parameters, DSL.comment("сведения об имуществе"), TableOptions.table(), where);
    }

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

    /**
     * Create an aliased <code>ervu_dashboard.property</code> table reference
     */
    public Property(Name alias) {
        this(alias, PROPERTY);
    }

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

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

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

    @Override
    public UniqueKey<PropertyRecord> getPrimaryKey() {
        return Keys.PK_PROPERTY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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