/*
 * This file is generated by jOOQ.
 */
package com.nisemoe.generated.tables.records


import com.nisemoe.generated.tables.Users

import java.time.LocalDateTime
import java.time.OffsetDateTime

import org.jooq.Field
import org.jooq.Record1
import org.jooq.Record18
import org.jooq.Row18
import org.jooq.impl.UpdatableRecordImpl


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class UsersRecord private constructor() : UpdatableRecordImpl<UsersRecord>(Users.USERS), Record18<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?> {

    open var userId: Long?
        set(value): Unit = set(0, value)
        get(): Long? = get(0) as Long?

    open var username: String?
        set(value): Unit = set(1, value)
        get(): String? = get(1) as String?

    open var joinDate: LocalDateTime?
        set(value): Unit = set(2, value)
        get(): LocalDateTime? = get(2) as LocalDateTime?

    open var country: String?
        set(value): Unit = set(3, value)
        get(): String? = get(3) as String?

    open var countryRank: Long?
        set(value): Unit = set(4, value)
        get(): Long? = get(4) as Long?

    open var rank: Long?
        set(value): Unit = set(5, value)
        get(): Long? = get(5) as Long?

    open var ppRaw: Double?
        set(value): Unit = set(6, value)
        get(): Double? = get(6) as Double?

    open var accuracy: Double?
        set(value): Unit = set(7, value)
        get(): Double? = get(7) as Double?

    open var playcount: Long?
        set(value): Unit = set(8, value)
        get(): Long? = get(8) as Long?

    open var totalScore: Long?
        set(value): Unit = set(9, value)
        get(): Long? = get(9) as Long?

    open var rankedScore: Long?
        set(value): Unit = set(10, value)
        get(): Long? = get(10) as Long?

    open var secondsPlayed: Long?
        set(value): Unit = set(11, value)
        get(): Long? = get(11) as Long?

    open var count_100: Long?
        set(value): Unit = set(12, value)
        get(): Long? = get(12) as Long?

    open var count_300: Long?
        set(value): Unit = set(13, value)
        get(): Long? = get(13) as Long?

    open var count_50: Long?
        set(value): Unit = set(14, value)
        get(): Long? = get(14) as Long?

    open var sysLastUpdate: OffsetDateTime?
        set(value): Unit = set(15, value)
        get(): OffsetDateTime? = get(15) as OffsetDateTime?

    @Suppress("INAPPLICABLE_JVM_NAME")
    @set:JvmName("setIsAdmin")
    open var isAdmin: Boolean?
        set(value): Unit = set(16, value)
        get(): Boolean? = get(16) as Boolean?

    open var countMiss: Long?
        set(value): Unit = set(17, value)
        get(): Long? = get(17) as Long?

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

    override fun key(): Record1<Long?> = super.key() as Record1<Long?>

    // -------------------------------------------------------------------------
    // Record18 type implementation
    // -------------------------------------------------------------------------

    override fun fieldsRow(): Row18<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?> = super.fieldsRow() as Row18<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?>
    override fun valuesRow(): Row18<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?> = super.valuesRow() as Row18<Long?, String?, LocalDateTime?, String?, Long?, Long?, Double?, Double?, Long?, Long?, Long?, Long?, Long?, Long?, Long?, OffsetDateTime?, Boolean?, Long?>
    override fun field1(): Field<Long?> = Users.USERS.USER_ID
    override fun field2(): Field<String?> = Users.USERS.USERNAME
    override fun field3(): Field<LocalDateTime?> = Users.USERS.JOIN_DATE
    override fun field4(): Field<String?> = Users.USERS.COUNTRY
    override fun field5(): Field<Long?> = Users.USERS.COUNTRY_RANK
    override fun field6(): Field<Long?> = Users.USERS.RANK
    override fun field7(): Field<Double?> = Users.USERS.PP_RAW
    override fun field8(): Field<Double?> = Users.USERS.ACCURACY
    override fun field9(): Field<Long?> = Users.USERS.PLAYCOUNT
    override fun field10(): Field<Long?> = Users.USERS.TOTAL_SCORE
    override fun field11(): Field<Long?> = Users.USERS.RANKED_SCORE
    override fun field12(): Field<Long?> = Users.USERS.SECONDS_PLAYED
    override fun field13(): Field<Long?> = Users.USERS.COUNT_100
    override fun field14(): Field<Long?> = Users.USERS.COUNT_300
    override fun field15(): Field<Long?> = Users.USERS.COUNT_50
    override fun field16(): Field<OffsetDateTime?> = Users.USERS.SYS_LAST_UPDATE
    override fun field17(): Field<Boolean?> = Users.USERS.IS_ADMIN
    override fun field18(): Field<Long?> = Users.USERS.COUNT_MISS
    override fun component1(): Long? = userId
    override fun component2(): String? = username
    override fun component3(): LocalDateTime? = joinDate
    override fun component4(): String? = country
    override fun component5(): Long? = countryRank
    override fun component6(): Long? = rank
    override fun component7(): Double? = ppRaw
    override fun component8(): Double? = accuracy
    override fun component9(): Long? = playcount
    override fun component10(): Long? = totalScore
    override fun component11(): Long? = rankedScore
    override fun component12(): Long? = secondsPlayed
    override fun component13(): Long? = count_100
    override fun component14(): Long? = count_300
    override fun component15(): Long? = count_50
    override fun component16(): OffsetDateTime? = sysLastUpdate
    override fun component17(): Boolean? = isAdmin
    override fun component18(): Long? = countMiss
    override fun value1(): Long? = userId
    override fun value2(): String? = username
    override fun value3(): LocalDateTime? = joinDate
    override fun value4(): String? = country
    override fun value5(): Long? = countryRank
    override fun value6(): Long? = rank
    override fun value7(): Double? = ppRaw
    override fun value8(): Double? = accuracy
    override fun value9(): Long? = playcount
    override fun value10(): Long? = totalScore
    override fun value11(): Long? = rankedScore
    override fun value12(): Long? = secondsPlayed
    override fun value13(): Long? = count_100
    override fun value14(): Long? = count_300
    override fun value15(): Long? = count_50
    override fun value16(): OffsetDateTime? = sysLastUpdate
    override fun value17(): Boolean? = isAdmin
    override fun value18(): Long? = countMiss

    override fun value1(value: Long?): UsersRecord {
        set(0, value)
        return this
    }

    override fun value2(value: String?): UsersRecord {
        set(1, value)
        return this
    }

    override fun value3(value: LocalDateTime?): UsersRecord {
        set(2, value)
        return this
    }

    override fun value4(value: String?): UsersRecord {
        set(3, value)
        return this
    }

    override fun value5(value: Long?): UsersRecord {
        set(4, value)
        return this
    }

    override fun value6(value: Long?): UsersRecord {
        set(5, value)
        return this
    }

    override fun value7(value: Double?): UsersRecord {
        set(6, value)
        return this
    }

    override fun value8(value: Double?): UsersRecord {
        set(7, value)
        return this
    }

    override fun value9(value: Long?): UsersRecord {
        set(8, value)
        return this
    }

    override fun value10(value: Long?): UsersRecord {
        set(9, value)
        return this
    }

    override fun value11(value: Long?): UsersRecord {
        set(10, value)
        return this
    }

    override fun value12(value: Long?): UsersRecord {
        set(11, value)
        return this
    }

    override fun value13(value: Long?): UsersRecord {
        set(12, value)
        return this
    }

    override fun value14(value: Long?): UsersRecord {
        set(13, value)
        return this
    }

    override fun value15(value: Long?): UsersRecord {
        set(14, value)
        return this
    }

    override fun value16(value: OffsetDateTime?): UsersRecord {
        set(15, value)
        return this
    }

    override fun value17(value: Boolean?): UsersRecord {
        set(16, value)
        return this
    }

    override fun value18(value: Long?): UsersRecord {
        set(17, value)
        return this
    }

    override fun values(value1: Long?, value2: String?, value3: LocalDateTime?, value4: String?, value5: Long?, value6: Long?, value7: Double?, value8: Double?, value9: Long?, value10: Long?, value11: Long?, value12: Long?, value13: Long?, value14: Long?, value15: Long?, value16: OffsetDateTime?, value17: Boolean?, value18: Long?): UsersRecord {
        this.value1(value1)
        this.value2(value2)
        this.value3(value3)
        this.value4(value4)
        this.value5(value5)
        this.value6(value6)
        this.value7(value7)
        this.value8(value8)
        this.value9(value9)
        this.value10(value10)
        this.value11(value11)
        this.value12(value12)
        this.value13(value13)
        this.value14(value14)
        this.value15(value15)
        this.value16(value16)
        this.value17(value17)
        this.value18(value18)
        return this
    }

    /**
     * Create a detached, initialised UsersRecord
     */
    constructor(userId: Long? = null, username: String? = null, joinDate: LocalDateTime? = null, country: String? = null, countryRank: Long? = null, rank: Long? = null, ppRaw: Double? = null, accuracy: Double? = null, playcount: Long? = null, totalScore: Long? = null, rankedScore: Long? = null, secondsPlayed: Long? = null, count_100: Long? = null, count_300: Long? = null, count_50: Long? = null, sysLastUpdate: OffsetDateTime? = null, isAdmin: Boolean? = null, countMiss: Long? = null): this() {
        this.userId = userId
        this.username = username
        this.joinDate = joinDate
        this.country = country
        this.countryRank = countryRank
        this.rank = rank
        this.ppRaw = ppRaw
        this.accuracy = accuracy
        this.playcount = playcount
        this.totalScore = totalScore
        this.rankedScore = rankedScore
        this.secondsPlayed = secondsPlayed
        this.count_100 = count_100
        this.count_300 = count_300
        this.count_50 = count_50
        this.sysLastUpdate = sysLastUpdate
        this.isAdmin = isAdmin
        this.countMiss = countMiss
        resetChangedOnNotNull()
    }
}
