/*
 * This file is generated by jOOQ.
 */
package com.databasir.dao.tables.records;


import com.databasir.dao.tables.Login;
import com.databasir.dao.tables.pojos.LoginPojo;

import java.time.LocalDateTime;

import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Record8;
import org.jooq.Row8;
import org.jooq.impl.UpdatableRecordImpl;


/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class LoginRecord extends UpdatableRecordImpl<LoginRecord> implements Record8<Integer, Integer, String, String, LocalDateTime, LocalDateTime, LocalDateTime, LocalDateTime> {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for <code>databasir.login.id</code>.
     */
    public void setId(Integer value) {
        set(0, value);
    }

    /**
     * Getter for <code>databasir.login.id</code>.
     */
    public Integer getId() {
        return (Integer) get(0);
    }

    /**
     * Setter for <code>databasir.login.user_id</code>.
     */
    public void setUserId(Integer value) {
        set(1, value);
    }

    /**
     * Getter for <code>databasir.login.user_id</code>.
     */
    public Integer getUserId() {
        return (Integer) get(1);
    }

    /**
     * Setter for <code>databasir.login.access_token</code>.
     */
    public void setAccessToken(String value) {
        set(2, value);
    }

    /**
     * Getter for <code>databasir.login.access_token</code>.
     */
    public String getAccessToken() {
        return (String) get(2);
    }

    /**
     * Setter for <code>databasir.login.refresh_token</code>.
     */
    public void setRefreshToken(String value) {
        set(3, value);
    }

    /**
     * Getter for <code>databasir.login.refresh_token</code>.
     */
    public String getRefreshToken() {
        return (String) get(3);
    }

    /**
     * Setter for <code>databasir.login.access_token_expire_at</code>.
     */
    public void setAccessTokenExpireAt(LocalDateTime value) {
        set(4, value);
    }

    /**
     * Getter for <code>databasir.login.access_token_expire_at</code>.
     */
    public LocalDateTime getAccessTokenExpireAt() {
        return (LocalDateTime) get(4);
    }

    /**
     * Setter for <code>databasir.login.refresh_token_expire_at</code>.
     */
    public void setRefreshTokenExpireAt(LocalDateTime value) {
        set(5, value);
    }

    /**
     * Getter for <code>databasir.login.refresh_token_expire_at</code>.
     */
    public LocalDateTime getRefreshTokenExpireAt() {
        return (LocalDateTime) get(5);
    }

    /**
     * Setter for <code>databasir.login.update_at</code>.
     */
    public void setUpdateAt(LocalDateTime value) {
        set(6, value);
    }

    /**
     * Getter for <code>databasir.login.update_at</code>.
     */
    public LocalDateTime getUpdateAt() {
        return (LocalDateTime) get(6);
    }

    /**
     * Setter for <code>databasir.login.create_at</code>.
     */
    public void setCreateAt(LocalDateTime value) {
        set(7, value);
    }

    /**
     * Getter for <code>databasir.login.create_at</code>.
     */
    public LocalDateTime getCreateAt() {
        return (LocalDateTime) get(7);
    }

    // -------------------------------------------------------------------------
    // Primary key information
    // -------------------------------------------------------------------------

    @Override
    public Record1<Integer> key() {
        return (Record1) super.key();
    }

    // -------------------------------------------------------------------------
    // Record8 type implementation
    // -------------------------------------------------------------------------

    @Override
    public Row8<Integer, Integer, String, String, LocalDateTime, LocalDateTime, LocalDateTime, LocalDateTime> fieldsRow() {
        return (Row8) super.fieldsRow();
    }

    @Override
    public Row8<Integer, Integer, String, String, LocalDateTime, LocalDateTime, LocalDateTime, LocalDateTime> valuesRow() {
        return (Row8) super.valuesRow();
    }

    @Override
    public Field<Integer> field1() {
        return Login.LOGIN.ID;
    }

    @Override
    public Field<Integer> field2() {
        return Login.LOGIN.USER_ID;
    }

    @Override
    public Field<String> field3() {
        return Login.LOGIN.ACCESS_TOKEN;
    }

    @Override
    public Field<String> field4() {
        return Login.LOGIN.REFRESH_TOKEN;
    }

    @Override
    public Field<LocalDateTime> field5() {
        return Login.LOGIN.ACCESS_TOKEN_EXPIRE_AT;
    }

    @Override
    public Field<LocalDateTime> field6() {
        return Login.LOGIN.REFRESH_TOKEN_EXPIRE_AT;
    }

    @Override
    public Field<LocalDateTime> field7() {
        return Login.LOGIN.UPDATE_AT;
    }

    @Override
    public Field<LocalDateTime> field8() {
        return Login.LOGIN.CREATE_AT;
    }

    @Override
    public Integer component1() {
        return getId();
    }

    @Override
    public Integer component2() {
        return getUserId();
    }

    @Override
    public String component3() {
        return getAccessToken();
    }

    @Override
    public String component4() {
        return getRefreshToken();
    }

    @Override
    public LocalDateTime component5() {
        return getAccessTokenExpireAt();
    }

    @Override
    public LocalDateTime component6() {
        return getRefreshTokenExpireAt();
    }

    @Override
    public LocalDateTime component7() {
        return getUpdateAt();
    }

    @Override
    public LocalDateTime component8() {
        return getCreateAt();
    }

    @Override
    public Integer value1() {
        return getId();
    }

    @Override
    public Integer value2() {
        return getUserId();
    }

    @Override
    public String value3() {
        return getAccessToken();
    }

    @Override
    public String value4() {
        return getRefreshToken();
    }

    @Override
    public LocalDateTime value5() {
        return getAccessTokenExpireAt();
    }

    @Override
    public LocalDateTime value6() {
        return getRefreshTokenExpireAt();
    }

    @Override
    public LocalDateTime value7() {
        return getUpdateAt();
    }

    @Override
    public LocalDateTime value8() {
        return getCreateAt();
    }

    @Override
    public LoginRecord value1(Integer value) {
        setId(value);
        return this;
    }

    @Override
    public LoginRecord value2(Integer value) {
        setUserId(value);
        return this;
    }

    @Override
    public LoginRecord value3(String value) {
        setAccessToken(value);
        return this;
    }

    @Override
    public LoginRecord value4(String value) {
        setRefreshToken(value);
        return this;
    }

    @Override
    public LoginRecord value5(LocalDateTime value) {
        setAccessTokenExpireAt(value);
        return this;
    }

    @Override
    public LoginRecord value6(LocalDateTime value) {
        setRefreshTokenExpireAt(value);
        return this;
    }

    @Override
    public LoginRecord value7(LocalDateTime value) {
        setUpdateAt(value);
        return this;
    }

    @Override
    public LoginRecord value8(LocalDateTime value) {
        setCreateAt(value);
        return this;
    }

    @Override
    public LoginRecord values(Integer value1, Integer value2, String value3, String value4, LocalDateTime value5, LocalDateTime value6, LocalDateTime value7, LocalDateTime value8) {
        value1(value1);
        value2(value2);
        value3(value3);
        value4(value4);
        value5(value5);
        value6(value6);
        value7(value7);
        value8(value8);
        return this;
    }

    // -------------------------------------------------------------------------
    // Constructors
    // -------------------------------------------------------------------------

    /**
     * Create a detached LoginRecord
     */
    public LoginRecord() {
        super(Login.LOGIN);
    }

    /**
     * Create a detached, initialised LoginRecord
     */
    public LoginRecord(Integer id, Integer userId, String accessToken, String refreshToken, LocalDateTime accessTokenExpireAt, LocalDateTime refreshTokenExpireAt, LocalDateTime updateAt, LocalDateTime createAt) {
        super(Login.LOGIN);

        setId(id);
        setUserId(userId);
        setAccessToken(accessToken);
        setRefreshToken(refreshToken);
        setAccessTokenExpireAt(accessTokenExpireAt);
        setRefreshTokenExpireAt(refreshTokenExpireAt);
        setUpdateAt(updateAt);
        setCreateAt(createAt);
    }

    /**
     * Create a detached, initialised LoginRecord
     */
    public LoginRecord(LoginPojo value) {
        super(Login.LOGIN);

        if (value != null) {
            setId(value.getId());
            setUserId(value.getUserId());
            setAccessToken(value.getAccessToken());
            setRefreshToken(value.getRefreshToken());
            setAccessTokenExpireAt(value.getAccessTokenExpireAt());
            setRefreshTokenExpireAt(value.getRefreshTokenExpireAt());
            setUpdateAt(value.getUpdateAt());
            setCreateAt(value.getCreateAt());
        }
    }
}
