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


import com.nisemoe.generated.tables.UpdateUserQueue

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

import org.jooq.Record1
import org.jooq.impl.UpdatableRecordImpl


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class UpdateUserQueueRecord private constructor() : UpdatableRecordImpl<UpdateUserQueueRecord>(UpdateUserQueue.UPDATE_USER_QUEUE) {

    open var id: Int?
        set(value): Unit = set(0, value)
        get(): Int? = get(0) as Int?

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

    open var processed: Boolean?
        set(value): Unit = set(2, value)
        get(): Boolean? = get(2) as Boolean?

    open var createdAt: LocalDateTime?
        set(value): Unit = set(3, value)
        get(): LocalDateTime? = get(3) as LocalDateTime?

    open var processedAt: OffsetDateTime?
        set(value): Unit = set(4, value)
        get(): OffsetDateTime? = get(4) as OffsetDateTime?

    open var progressCurrent: Int?
        set(value): Unit = set(5, value)
        get(): Int? = get(5) as Int?

    open var progressTotal: Int?
        set(value): Unit = set(6, value)
        get(): Int? = get(6) as Int?

    open var addedByUserId: Long?
        set(value): Unit = set(7, value)
        get(): Long? = get(7) as Long?

    open var hasFailed: Boolean?
        set(value): Unit = set(8, value)
        get(): Boolean? = get(8) as Boolean?

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

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

    /**
     * Create a detached, initialised UpdateUserQueueRecord
     */
    constructor(id: Int? = null, userId: Long, processed: Boolean? = null, createdAt: LocalDateTime? = null, processedAt: OffsetDateTime? = null, progressCurrent: Int? = null, progressTotal: Int? = null, addedByUserId: Long? = null, hasFailed: Boolean? = null): this() {
        this.id = id
        this.userId = userId
        this.processed = processed
        this.createdAt = createdAt
        this.processedAt = processedAt
        this.progressCurrent = progressCurrent
        this.progressTotal = progressTotal
        this.addedByUserId = addedByUserId
        this.hasFailed = hasFailed
        resetChangedOnNotNull()
    }
}
