/*
 * This file is generated by jOOQ.
 */
package jooq.main.tables.records


import java.time.OffsetDateTime

import jooq.main.tables.Comment

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


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class CommentRecord() : UpdatableRecordImpl<CommentRecord>(Comment.COMMENT) {

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

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

    open var kotlinerId: Long?
        set(value): Unit = set(2, value)
        get(): Long? = get(2) as Long?

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

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

    open var updated: OffsetDateTime?
        set(value): Unit = set(5, value)
        get(): OffsetDateTime? = get(5) as OffsetDateTime?

    open var version: Long?
        set(value): Unit = set(6, value)
        get(): Long? = get(6) as Long?

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

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

    /**
     * Create a detached, initialised CommentRecord
     */
    constructor(id: Long? = null, parentId: Long? = null, kotlinerId: Long? = null, content: String? = null, created: OffsetDateTime? = null, updated: OffsetDateTime? = null, version: Long? = null): this() {
        this.id = id
        this.parentId = parentId
        this.kotlinerId = kotlinerId
        this.content = content
        this.created = created
        this.updated = updated
        this.version = version
        resetChangedOnNotNull()
    }

    /**
     * Create a detached, initialised CommentRecord
     */
    constructor(value: jooq.main.tables.pojos.Comment?): this() {
        if (value != null) {
            this.id = value.id
            this.parentId = value.parentId
            this.kotlinerId = value.kotlinerId
            this.content = value.content
            this.created = value.created
            this.updated = value.updated
            this.version = value.version
            resetChangedOnNotNull()
        }
    }
}
