/**
 * This class is generated by jOOQ
 */
package com.parallax.server.common.cloudsession.db.generated.tables;


import com.parallax.server.common.cloudsession.db.generated.Cloudsession;
import com.parallax.server.common.cloudsession.db.generated.Keys;
import com.parallax.server.common.cloudsession.db.generated.tables.records.ConfirmtokenRecord;

import java.sql.Timestamp;
import java.util.Arrays;
import java.util.List;

import javax.annotation.Generated;

import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Identity;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.TableImpl;


/**
 * This class is generated by jOOQ.
 */
@Generated(
	value = {
		"http://www.jooq.org",
		"jOOQ version:3.6.1"
	},
	comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Confirmtoken extends TableImpl<ConfirmtokenRecord> {

	private static final long serialVersionUID = -1033243900;

	/**
	 * The reference instance of <code>cloudsession.confirmtoken</code>
	 */
	public static final Confirmtoken CONFIRMTOKEN = new Confirmtoken();

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

	/**
	 * The column <code>cloudsession.confirmtoken.id</code>.
	 */
	public final TableField<ConfirmtokenRecord, Long> ID = createField("id", org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "");

	/**
	 * The column <code>cloudsession.confirmtoken.id_user</code>.
	 */
	public final TableField<ConfirmtokenRecord, Long> ID_USER = createField("id_user", org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "");

	/**
	 * The column <code>cloudsession.confirmtoken.validity</code>.
	 */
	public final TableField<ConfirmtokenRecord, Timestamp> VALIDITY = createField("validity", org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaulted(true), this, "");

	/**
	 * The column <code>cloudsession.confirmtoken.token</code>.
	 */
	public final TableField<ConfirmtokenRecord, String> TOKEN = createField("token", org.jooq.impl.SQLDataType.VARCHAR.length(255).nullable(false), this, "");

	/**
	 * Create a <code>cloudsession.confirmtoken</code> table reference
	 */
	public Confirmtoken() {
		this("confirmtoken", null);
	}

	/**
	 * Create an aliased <code>cloudsession.confirmtoken</code> table reference
	 */
	public Confirmtoken(String alias) {
		this(alias, CONFIRMTOKEN);
	}

	private Confirmtoken(String alias, Table<ConfirmtokenRecord> aliased) {
		this(alias, aliased, null);
	}

	private Confirmtoken(String alias, Table<ConfirmtokenRecord> aliased, Field<?>[] parameters) {
		super(alias, Cloudsession.CLOUDSESSION, aliased, parameters, "");
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Identity<ConfirmtokenRecord, Long> getIdentity() {
		return Keys.IDENTITY_CONFIRMTOKEN;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public UniqueKey<ConfirmtokenRecord> getPrimaryKey() {
		return Keys.KEY_CONFIRMTOKEN_PRIMARY;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public List<UniqueKey<ConfirmtokenRecord>> getKeys() {
		return Arrays.<UniqueKey<ConfirmtokenRecord>>asList(Keys.KEY_CONFIRMTOKEN_PRIMARY, Keys.KEY_CONFIRMTOKEN_ID_USER_UNIQUE);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public List<ForeignKey<ConfirmtokenRecord, ?>> getReferences() {
		return Arrays.<ForeignKey<ConfirmtokenRecord, ?>>asList(Keys.CONFIRMTOKEN_USER);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public Confirmtoken as(String alias) {
		return new Confirmtoken(alias, this);
	}

	/**
	 * Rename this table
	 */
	public Confirmtoken rename(String name) {
		return new Confirmtoken(name, null);
	}
}
