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


import java.time.OffsetDateTime

import jooq.main.tables.Article

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


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class ArticleRecord() : UpdatableRecordImpl<ArticleRecord>(Article.ARTICLE) {

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

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

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

    open var updatedBy: Long?
        set(value): Unit = set(3, value)
        get(): Long? = get(3) as Long?

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

    open var status: String?
        set(value): Unit = set(5, value)
        get(): String? = get(5) as String?

    open var title: String?
        set(value): Unit = set(6, value)
        get(): String? = get(6) as String?

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

    open var language: String?
        set(value): Unit = set(8, value)
        get(): String? = get(8) as String?

    open var url: String?
        set(value): Unit = set(9, value)
        get(): String? = get(9) as String?

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

    open var thumbnail: String?
        set(value): Unit = set(11, value)
        get(): String? = get(11) as String?

    open var published: OffsetDateTime?
        set(value): Unit = set(12, value)
        get(): OffsetDateTime? = get(12) as OffsetDateTime?

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

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

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

    /**
     * Create a detached, initialised ArticleRecord
     */
    constructor(id: Long? = null, created: OffsetDateTime? = null, updated: OffsetDateTime? = null, updatedBy: Long? = null, createdBy: Long? = null, status: String? = null, title: String? = null, originalId: Long? = null, language: String? = null, url: String? = null, content: String? = null, thumbnail: String? = null, published: OffsetDateTime? = null, version: Long? = null): this() {
        this.id = id
        this.created = created
        this.updated = updated
        this.updatedBy = updatedBy
        this.createdBy = createdBy
        this.status = status
        this.title = title
        this.originalId = originalId
        this.language = language
        this.url = url
        this.content = content
        this.thumbnail = thumbnail
        this.published = published
        this.version = version
        resetChangedOnNotNull()
    }

    /**
     * Create a detached, initialised ArticleRecord
     */
    constructor(value: jooq.main.tables.pojos.Article?): this() {
        if (value != null) {
            this.id = value.id
            this.created = value.created
            this.updated = value.updated
            this.updatedBy = value.updatedBy
            this.createdBy = value.createdBy
            this.status = value.status
            this.title = value.title
            this.originalId = value.originalId
            this.language = value.language
            this.url = value.url
            this.content = value.content
            this.thumbnail = value.thumbnail
            this.published = value.published
            this.version = value.version
            resetChangedOnNotNull()
        }
    }
}
