/**
 * This class is generated by jOOQ
 */
package io.cattle.platform.core.model.tables;

/**
 * This class is generated by jOOQ.
 */
@javax.annotation.Generated(value    = { "http://www.jooq.org", "3.3.0" },
                            comments = "This class is generated by jOOQ")
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class AuthTokenTable extends org.jooq.impl.TableImpl<io.cattle.platform.core.model.tables.records.AuthTokenRecord> {

	private static final long serialVersionUID = -1731277460;

	/**
	 * The singleton instance of <code>cattle.auth_token</code>
	 */
	public static final io.cattle.platform.core.model.tables.AuthTokenTable AUTH_TOKEN = new io.cattle.platform.core.model.tables.AuthTokenTable();

	/**
	 * The class holding records for this type
	 */
	@Override
	public java.lang.Class<io.cattle.platform.core.model.tables.records.AuthTokenRecord> getRecordType() {
		return io.cattle.platform.core.model.tables.records.AuthTokenRecord.class;
	}

	/**
	 * The column <code>cattle.auth_token.id</code>.
	 */
	public final org.jooq.TableField<io.cattle.platform.core.model.tables.records.AuthTokenRecord, java.lang.Long> ID = createField("id", org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "");

	/**
	 * The column <code>cattle.auth_token.account_id</code>.
	 */
	public final org.jooq.TableField<io.cattle.platform.core.model.tables.records.AuthTokenRecord, java.lang.Long> ACCOUNT_ID = createField("account_id", org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "");

	/**
	 * The column <code>cattle.auth_token.created</code>.
	 */
	public final org.jooq.TableField<io.cattle.platform.core.model.tables.records.AuthTokenRecord, java.util.Date> CREATED = createField("created", org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).asConvertedDataType(new io.cattle.platform.db.jooq.converter.DateConverter()), this, "");

	/**
	 * The column <code>cattle.auth_token.expires</code>.
	 */
	public final org.jooq.TableField<io.cattle.platform.core.model.tables.records.AuthTokenRecord, java.util.Date> EXPIRES = createField("expires", org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).asConvertedDataType(new io.cattle.platform.db.jooq.converter.DateConverter()), this, "");

	/**
	 * The column <code>cattle.auth_token.key</code>.
	 */
	public final org.jooq.TableField<io.cattle.platform.core.model.tables.records.AuthTokenRecord, java.lang.String> KEY = createField("key", org.jooq.impl.SQLDataType.VARCHAR.length(40).nullable(false), this, "");

	/**
	 * The column <code>cattle.auth_token.value</code>.
	 */
	public final org.jooq.TableField<io.cattle.platform.core.model.tables.records.AuthTokenRecord, java.lang.String> VALUE = createField("value", org.jooq.impl.SQLDataType.CLOB.length(16777215).nullable(false), this, "");

	/**
	 * The column <code>cattle.auth_token.version</code>.
	 */
	public final org.jooq.TableField<io.cattle.platform.core.model.tables.records.AuthTokenRecord, java.lang.String> VERSION = createField("version", org.jooq.impl.SQLDataType.VARCHAR.length(255).nullable(false), this, "");

	/**
	 * The column <code>cattle.auth_token.provider</code>.
	 */
	public final org.jooq.TableField<io.cattle.platform.core.model.tables.records.AuthTokenRecord, java.lang.String> PROVIDER = createField("provider", org.jooq.impl.SQLDataType.VARCHAR.length(255).nullable(false), this, "");

	/**
	 * The column <code>cattle.auth_token.authenticated_as_account_id</code>.
	 */
	public final org.jooq.TableField<io.cattle.platform.core.model.tables.records.AuthTokenRecord, java.lang.Long> AUTHENTICATED_AS_ACCOUNT_ID = createField("authenticated_as_account_id", org.jooq.impl.SQLDataType.BIGINT, this, "");

	/**
	 * Create a <code>cattle.auth_token</code> table reference
	 */
	public AuthTokenTable() {
		this("auth_token", null);
	}

	/**
	 * Create an aliased <code>cattle.auth_token</code> table reference
	 */
	public AuthTokenTable(java.lang.String alias) {
		this(alias, io.cattle.platform.core.model.tables.AuthTokenTable.AUTH_TOKEN);
	}

	private AuthTokenTable(java.lang.String alias, org.jooq.Table<io.cattle.platform.core.model.tables.records.AuthTokenRecord> aliased) {
		this(alias, aliased, null);
	}

	private AuthTokenTable(java.lang.String alias, org.jooq.Table<io.cattle.platform.core.model.tables.records.AuthTokenRecord> aliased, org.jooq.Field<?>[] parameters) {
		super(alias, io.cattle.platform.core.model.CattleTable.CATTLE, aliased, parameters, "");
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public org.jooq.Identity<io.cattle.platform.core.model.tables.records.AuthTokenRecord, java.lang.Long> getIdentity() {
		return io.cattle.platform.core.model.Keys.IDENTITY_AUTH_TOKEN;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public org.jooq.UniqueKey<io.cattle.platform.core.model.tables.records.AuthTokenRecord> getPrimaryKey() {
		return io.cattle.platform.core.model.Keys.KEY_AUTH_TOKEN_PRIMARY;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public java.util.List<org.jooq.UniqueKey<io.cattle.platform.core.model.tables.records.AuthTokenRecord>> getKeys() {
		return java.util.Arrays.<org.jooq.UniqueKey<io.cattle.platform.core.model.tables.records.AuthTokenRecord>>asList(io.cattle.platform.core.model.Keys.KEY_AUTH_TOKEN_PRIMARY, io.cattle.platform.core.model.Keys.KEY_AUTH_TOKEN_KEY, io.cattle.platform.core.model.Keys.KEY_AUTH_TOKEN_IDX_AUTH_TOKEN_KEY);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public java.util.List<org.jooq.ForeignKey<io.cattle.platform.core.model.tables.records.AuthTokenRecord, ?>> getReferences() {
		return java.util.Arrays.<org.jooq.ForeignKey<io.cattle.platform.core.model.tables.records.AuthTokenRecord, ?>>asList(io.cattle.platform.core.model.Keys.FK_AUTH_TOKEN__ACCOUNT_ID, io.cattle.platform.core.model.Keys.AUTH_TOKEN_IBFK_1);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public io.cattle.platform.core.model.tables.AuthTokenTable as(java.lang.String alias) {
		return new io.cattle.platform.core.model.tables.AuthTokenTable(alias, this);
	}

	/**
	 * Rename this table
	 */
	public io.cattle.platform.core.model.tables.AuthTokenTable rename(java.lang.String name) {
		return new io.cattle.platform.core.model.tables.AuthTokenTable(name, null);
	}
}
