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


import java.time.LocalDateTime

import jooq.main.tables.FlywaySchemaHistory

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


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
open class FlywaySchemaHistoryRecord() : UpdatableRecordImpl<FlywaySchemaHistoryRecord>(FlywaySchemaHistory.FLYWAY_SCHEMA_HISTORY) {

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

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

    open var description: String?
        set(value): Unit = set(2, value)
        get(): String? = get(2) as String?

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

    open var script: String?
        set(value): Unit = set(4, value)
        get(): String? = get(4) as String?

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

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

    open var installedOn: LocalDateTime?
        set(value): Unit = set(7, value)
        get(): LocalDateTime? = get(7) as LocalDateTime?

    open var executionTime: Int?
        set(value): Unit = set(8, value)
        get(): Int? = get(8) as Int?

    open var success: Boolean?
        set(value): Unit = set(9, value)
        get(): Boolean? = get(9) as Boolean?

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

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

    /**
     * Create a detached, initialised FlywaySchemaHistoryRecord
     */
    constructor(installedRank: Int? = null, version: String? = null, description: String? = null, type: String? = null, script: String? = null, checksum: Int? = null, installedBy: String? = null, installedOn: LocalDateTime? = null, executionTime: Int? = null, success: Boolean? = null): this() {
        this.installedRank = installedRank
        this.version = version
        this.description = description
        this.type = type
        this.script = script
        this.checksum = checksum
        this.installedBy = installedBy
        this.installedOn = installedOn
        this.executionTime = executionTime
        this.success = success
        resetChangedOnNotNull()
    }

    /**
     * Create a detached, initialised FlywaySchemaHistoryRecord
     */
    constructor(value: jooq.main.tables.pojos.FlywaySchemaHistory?): this() {
        if (value != null) {
            this.installedRank = value.installedRank
            this.version = value.version
            this.description = value.description
            this.type = value.type
            this.script = value.script
            this.checksum = value.checksum
            this.installedBy = value.installedBy
            this.installedOn = value.installedOn
            this.executionTime = value.executionTime
            this.success = value.success
            resetChangedOnNotNull()
        }
    }
}
