/*
 * This file is generated by jOOQ.
 */
package cn.vertxup.erp.domain.tables;


import cn.vertxup.erp.domain.Db;
import cn.vertxup.erp.domain.Keys;
import cn.vertxup.erp.domain.tables.records.EAssetRecord;
import org.jooq.Record;
import org.jooq.*;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({"all", "unchecked", "rawtypes"})
public class EAsset extends TableImpl<EAssetRecord> {

    /**
     * The reference instance of <code>DB_ETERNAL.E_ASSET</code>
     */
    public static final EAsset E_ASSET = new EAsset();
    private static final long serialVersionUID = 1L;
    /**
     * The column <code>DB_ETERNAL.E_ASSET.KEY</code>. 「key」- 资产主键
     */
    public final TableField<EAssetRecord, String> KEY = createField(DSL.name("KEY"), SQLDataType.VARCHAR(36).nullable(false), this, "「key」- 资产主键");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.NAME</code>. 「name」- 资产名称
     */
    public final TableField<EAssetRecord, String> NAME = createField(DSL.name("NAME"), SQLDataType.VARCHAR(255), this, "「name」- 资产名称");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.CODE</code>. 「code」- 资产编号
     */
    public final TableField<EAssetRecord, String> CODE = createField(DSL.name("CODE"), SQLDataType.VARCHAR(255), this, "「code」- 资产编号");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.TYPE</code>. 「type」- 资产类型
     */
    public final TableField<EAssetRecord, String> TYPE = createField(DSL.name("TYPE"), SQLDataType.VARCHAR(36), this, "「type」- 资产类型");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.STATUS</code>. 「status」- 资产状态
     */
    public final TableField<EAssetRecord, String> STATUS = createField(DSL.name("STATUS"), SQLDataType.VARCHAR(36), this, "「status」- 资产状态");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.MODEL_NUMBER</code>. 「modelNumber」-
     * 规格型号
     */
    public final TableField<EAssetRecord, String> MODEL_NUMBER = createField(DSL.name("MODEL_NUMBER"), SQLDataType.VARCHAR(255), this, "「modelNumber」- 规格型号");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.UNIT</code>. 「unit」- 计量单位
     */
    public final TableField<EAssetRecord, String> UNIT = createField(DSL.name("UNIT"), SQLDataType.VARCHAR(64), this, "「unit」- 计量单位");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.NUM</code>. 「num」- 资产数量
     */
    public final TableField<EAssetRecord, Long> NUM = createField(DSL.name("NUM"), SQLDataType.BIGINT, this, "「num」- 资产数量");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.NUM_DEPRECATING</code>.
     * 「numDeprecating」- 预计折旧数量
     */
    public final TableField<EAssetRecord, Long> NUM_DEPRECATING = createField(DSL.name("NUM_DEPRECATING"), SQLDataType.BIGINT, this, "「numDeprecating」- 预计折旧数量");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.NUM_DEPRECATED</code>.
     * 「numDeprecated」- 已折旧数量
     */
    public final TableField<EAssetRecord, Long> NUM_DEPRECATED = createField(DSL.name("NUM_DEPRECATED"), SQLDataType.BIGINT, this, "「numDeprecated」- 已折旧数量");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.NUM_USING</code>. 「numUsing」- 预计使用数量
     */
    public final TableField<EAssetRecord, Long> NUM_USING = createField(DSL.name("NUM_USING"), SQLDataType.BIGINT, this, "「numUsing」- 预计使用数量");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.NUM_USED</code>. 「numUsed」- 已使用数量
     */
    public final TableField<EAssetRecord, Long> NUM_USED = createField(DSL.name("NUM_USED"), SQLDataType.BIGINT, this, "「numUsed」- 已使用数量");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.WAY_CHANGE</code>. 「wayChange」- 变动方式
     */
    public final TableField<EAssetRecord, String> WAY_CHANGE = createField(DSL.name("WAY_CHANGE"), SQLDataType.VARCHAR(64), this, "「wayChange」- 变动方式");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.WAY_DEPRECATE</code>. 「wayDeprecate」-
     * 折旧方式
     */
    public final TableField<EAssetRecord, String> WAY_DEPRECATE = createField(DSL.name("WAY_DEPRECATE"), SQLDataType.VARCHAR(64), this, "「wayDeprecate」- 折旧方式");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.WAY_ACCORDING</code>. 「wayAccording」-
     * 折旧依据
     */
    public final TableField<EAssetRecord, String> WAY_ACCORDING = createField(DSL.name("WAY_ACCORDING"), SQLDataType.VARCHAR(64), this, "「wayAccording」- 折旧依据");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.USED_AT</code>. 「usedAt」- 开始使用时间
     */
    public final TableField<EAssetRecord, LocalDateTime> USED_AT = createField(DSL.name("USED_AT"), SQLDataType.LOCALDATETIME(0), this, "「usedAt」- 开始使用时间");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.USED_BY</code>. 「usedBy」- 使用者
     */
    public final TableField<EAssetRecord, String> USED_BY = createField(DSL.name("USED_BY"), SQLDataType.VARCHAR(64), this, "「usedBy」- 使用者");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.USED_STATUS</code>. 「usedStatus」-
     * 使用状态
     */
    public final TableField<EAssetRecord, String> USED_STATUS = createField(DSL.name("USED_STATUS"), SQLDataType.VARCHAR(255), this, "「usedStatus」- 使用状态");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.V_ORIGINAL</code>. 「vOriginal」- 原价值
     */
    public final TableField<EAssetRecord, BigDecimal> V_ORIGINAL = createField(DSL.name("V_ORIGINAL"), SQLDataType.DECIMAL(18, 2), this, "「vOriginal」- 原价值");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.V_TAX</code>. 「vTax」- 税额
     */
    public final TableField<EAssetRecord, BigDecimal> V_TAX = createField(DSL.name("V_TAX"), SQLDataType.DECIMAL(18, 2), this, "「vTax」- 税额");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.V_DE_READY</code>. 「vDeReady」- 减值准备
     */
    public final TableField<EAssetRecord, BigDecimal> V_DE_READY = createField(DSL.name("V_DE_READY"), SQLDataType.DECIMAL(18, 2), this, "「vDeReady」- 减值准备");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.V_NET_JUNK</code>. 「vNetJunk」- 净残值
     */
    public final TableField<EAssetRecord, BigDecimal> V_NET_JUNK = createField(DSL.name("V_NET_JUNK"), SQLDataType.DECIMAL(18, 2), this, "「vNetJunk」- 净残值");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.V_NET</code>. 「vNet」- 净值
     */
    public final TableField<EAssetRecord, BigDecimal> V_NET = createField(DSL.name("V_NET"), SQLDataType.DECIMAL(18, 2), this, "「vNet」- 净值");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.V_NET_AMOUNT</code>. 「vNetAmount」- 净额
     */
    public final TableField<EAssetRecord, BigDecimal> V_NET_AMOUNT = createField(DSL.name("V_NET_AMOUNT"), SQLDataType.DECIMAL(18, 2), this, "「vNetAmount」- 净额");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.V_DEPRECATED_M</code>.
     * 「vDeprecatedM」- 月折旧
     */
    public final TableField<EAssetRecord, BigDecimal> V_DEPRECATED_M = createField(DSL.name("V_DEPRECATED_M"), SQLDataType.DECIMAL(18, 2), this, "「vDeprecatedM」- 月折旧");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.V_DEPRECATED_A</code>.
     * 「vDeprecatedA」- 累积折旧
     */
    public final TableField<EAssetRecord, BigDecimal> V_DEPRECATED_A = createField(DSL.name("V_DEPRECATED_A"), SQLDataType.DECIMAL(18, 2), this, "「vDeprecatedA」- 累积折旧");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.K_FIXED</code>. 「kFixed」- 固定资产科目
     */
    public final TableField<EAssetRecord, String> K_FIXED = createField(DSL.name("K_FIXED"), SQLDataType.VARCHAR(36), this, "「kFixed」- 固定资产科目");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.K_DEPRECATED</code>. 「kDeprecated」-
     * 累积折旧科目
     */
    public final TableField<EAssetRecord, String> K_DEPRECATED = createField(DSL.name("K_DEPRECATED"), SQLDataType.VARCHAR(36), this, "「kDeprecated」- 累积折旧科目");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.K_ASSIGNMENT</code>. 「kAssignment」-
     * 折旧费用分配科目
     */
    public final TableField<EAssetRecord, String> K_ASSIGNMENT = createField(DSL.name("K_ASSIGNMENT"), SQLDataType.VARCHAR(36), this, "「kAssignment」- 折旧费用分配科目");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.K_TAX</code>. 「kTax」- 税金科目
     */
    public final TableField<EAssetRecord, String> K_TAX = createField(DSL.name("K_TAX"), SQLDataType.VARCHAR(36), this, "「kTax」- 税金科目");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.K_DEVALUE</code>. 「kDevalue」- 减值准备科目
     */
    public final TableField<EAssetRecord, String> K_DEVALUE = createField(DSL.name("K_DEVALUE"), SQLDataType.VARCHAR(36), this, "「kDevalue」- 减值准备科目");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.K_CHANGE</code>. 「kChange」- 资产变动对方科目
     */
    public final TableField<EAssetRecord, String> K_CHANGE = createField(DSL.name("K_CHANGE"), SQLDataType.VARCHAR(36), this, "「kChange」- 资产变动对方科目");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.CUSTOMER_ID</code>. 「customerId」-
     * 供应商ID
     */
    public final TableField<EAssetRecord, String> CUSTOMER_ID = createField(DSL.name("CUSTOMER_ID"), SQLDataType.VARCHAR(36), this, "「customerId」- 供应商ID");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.EXPIRED_AT</code>. 「expiredAt」- 到期时间
     */
    public final TableField<EAssetRecord, LocalDateTime> EXPIRED_AT = createField(DSL.name("EXPIRED_AT"), SQLDataType.LOCALDATETIME(0), this, "「expiredAt」- 到期时间");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.EXPIRED_COMMENT</code>.
     * 「expiredComment」- 到期说明
     */
    public final TableField<EAssetRecord, String> EXPIRED_COMMENT = createField(DSL.name("EXPIRED_COMMENT"), SQLDataType.CLOB, this, "「expiredComment」- 到期说明");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.USER_ID</code>. 「userId」- 资产管理者
     */
    public final TableField<EAssetRecord, String> USER_ID = createField(DSL.name("USER_ID"), SQLDataType.VARCHAR(36), this, "「userId」- 资产管理者");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.STORE_ID</code>. 「storeId」- 所属仓库ID
     */
    public final TableField<EAssetRecord, String> STORE_ID = createField(DSL.name("STORE_ID"), SQLDataType.VARCHAR(36), this, "「storeId」- 所属仓库ID");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.DEPT_ID</code>. 「deptId」- 所属部门
     */
    public final TableField<EAssetRecord, String> DEPT_ID = createField(DSL.name("DEPT_ID"), SQLDataType.VARCHAR(36), this, "「deptId」- 所属部门");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.COMPANY_ID</code>. 「companyId」- 所属公司
     */
    public final TableField<EAssetRecord, String> COMPANY_ID = createField(DSL.name("COMPANY_ID"), SQLDataType.VARCHAR(36), this, "「companyId」- 所属公司");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.PARENT_ID</code>. 「parentId」- 上级资产
     */
    public final TableField<EAssetRecord, String> PARENT_ID = createField(DSL.name("PARENT_ID"), SQLDataType.VARCHAR(36), this, "「parentId」- 上级资产");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.COMMENT</code>. 「comment」- 资产备注
     */
    public final TableField<EAssetRecord, String> COMMENT = createField(DSL.name("COMMENT"), SQLDataType.CLOB, this, "「comment」- 资产备注");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.SIGMA</code>. 「sigma」- 统一标识
     */
    public final TableField<EAssetRecord, String> SIGMA = createField(DSL.name("SIGMA"), SQLDataType.VARCHAR(32), this, "「sigma」- 统一标识");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.LANGUAGE</code>. 「language」- 使用的语言
     */
    public final TableField<EAssetRecord, String> LANGUAGE = createField(DSL.name("LANGUAGE"), SQLDataType.VARCHAR(10), this, "「language」- 使用的语言");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.ACTIVE</code>. 「active」- 是否启用
     */
    public final TableField<EAssetRecord, Boolean> ACTIVE = createField(DSL.name("ACTIVE"), SQLDataType.BIT, this, "「active」- 是否启用");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.METADATA</code>. 「metadata」- 附加配置数据
     */
    public final TableField<EAssetRecord, String> METADATA = createField(DSL.name("METADATA"), SQLDataType.CLOB, this, "「metadata」- 附加配置数据");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.ENTER_AT</code>. 「enterAt」- 入库时间
     */
    public final TableField<EAssetRecord, LocalDateTime> ENTER_AT = createField(DSL.name("ENTER_AT"), SQLDataType.LOCALDATETIME(0), this, "「enterAt」- 入库时间");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.ENTER_BY</code>. 「enterBy」- 入库人
     */
    public final TableField<EAssetRecord, String> ENTER_BY = createField(DSL.name("ENTER_BY"), SQLDataType.VARCHAR(36), this, "「enterBy」- 入库人");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.ACCOUNT_AT</code>. 「accountAt」- 入账时间
     */
    public final TableField<EAssetRecord, LocalDateTime> ACCOUNT_AT = createField(DSL.name("ACCOUNT_AT"), SQLDataType.LOCALDATETIME(0), this, "「accountAt」- 入账时间");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.ACCOUNT_BY</code>. 「accountBy」- 入账人
     */
    public final TableField<EAssetRecord, String> ACCOUNT_BY = createField(DSL.name("ACCOUNT_BY"), SQLDataType.VARCHAR(36), this, "「accountBy」- 入账人");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.SCRAP_AT</code>. 「scrapAt」- 报废时间
     */
    public final TableField<EAssetRecord, LocalDateTime> SCRAP_AT = createField(DSL.name("SCRAP_AT"), SQLDataType.LOCALDATETIME(0), this, "「scrapAt」- 报废时间");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.SCRAP_BY</code>. 「scrapBy」- 报废人
     */
    public final TableField<EAssetRecord, String> SCRAP_BY = createField(DSL.name("SCRAP_BY"), SQLDataType.VARCHAR(36), this, "「scrapBy」- 报废人");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.CREATED_AT</code>. 「createdAt」- 创建时间
     */
    public final TableField<EAssetRecord, LocalDateTime> CREATED_AT = createField(DSL.name("CREATED_AT"), SQLDataType.LOCALDATETIME(0), this, "「createdAt」- 创建时间");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.CREATED_BY</code>. 「createdBy」- 创建人
     */
    public final TableField<EAssetRecord, String> CREATED_BY = createField(DSL.name("CREATED_BY"), SQLDataType.VARCHAR(36), this, "「createdBy」- 创建人");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.UPDATED_AT</code>. 「updatedAt」- 更新时间
     */
    public final TableField<EAssetRecord, LocalDateTime> UPDATED_AT = createField(DSL.name("UPDATED_AT"), SQLDataType.LOCALDATETIME(0), this, "「updatedAt」- 更新时间");
    /**
     * The column <code>DB_ETERNAL.E_ASSET.UPDATED_BY</code>. 「updatedBy」- 更新人
     */
    public final TableField<EAssetRecord, String> UPDATED_BY = createField(DSL.name("UPDATED_BY"), SQLDataType.VARCHAR(36), this, "「updatedBy」- 更新人");

    private EAsset(Name alias, Table<EAssetRecord> aliased) {
        this(alias, aliased, null);
    }

    private EAsset(Name alias, Table<EAssetRecord> aliased, Field<?>[] parameters) {
        super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
    }

    /**
     * Create an aliased <code>DB_ETERNAL.E_ASSET</code> table reference
     */
    public EAsset(String alias) {
        this(DSL.name(alias), E_ASSET);
    }

    /**
     * Create an aliased <code>DB_ETERNAL.E_ASSET</code> table reference
     */
    public EAsset(Name alias) {
        this(alias, E_ASSET);
    }

    /**
     * Create a <code>DB_ETERNAL.E_ASSET</code> table reference
     */
    public EAsset() {
        this(DSL.name("E_ASSET"), null);
    }

    public <O extends Record> EAsset(Table<O> child, ForeignKey<O, EAssetRecord> key) {
        super(child, key, E_ASSET);
    }

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

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

    @Override
    public UniqueKey<EAssetRecord> getPrimaryKey() {
        return Keys.KEY_E_ASSET_PRIMARY;
    }

    @Override
    public List<UniqueKey<EAssetRecord>> getUniqueKeys() {
        return Arrays.asList(Keys.KEY_E_ASSET_NAME, Keys.KEY_E_ASSET_CODE);
    }

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

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

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

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

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

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