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


import java.io.Serializable
import java.time.LocalDateTime


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
data class FlywaySchemaHistory(
    var installedRank: Int? = null,
    var version: String? = null,
    var description: String? = null,
    var type: String? = null,
    var script: String? = null,
    var checksum: Int? = null,
    var installedBy: String? = null,
    var installedOn: LocalDateTime? = null,
    var executionTime: Int? = null,
    var success: Boolean? = null
): Serializable {


    override fun equals(other: Any?): Boolean {
        if (this === other)
            return true
        if (other == null)
            return false
        if (this::class != other::class)
            return false
        val o: FlywaySchemaHistory = other as FlywaySchemaHistory
        if (this.installedRank == null) {
            if (o.installedRank != null)
                return false
        }
        else if (this.installedRank != o.installedRank)
            return false
        if (this.version == null) {
            if (o.version != null)
                return false
        }
        else if (this.version != o.version)
            return false
        if (this.description == null) {
            if (o.description != null)
                return false
        }
        else if (this.description != o.description)
            return false
        if (this.type == null) {
            if (o.type != null)
                return false
        }
        else if (this.type != o.type)
            return false
        if (this.script == null) {
            if (o.script != null)
                return false
        }
        else if (this.script != o.script)
            return false
        if (this.checksum == null) {
            if (o.checksum != null)
                return false
        }
        else if (this.checksum != o.checksum)
            return false
        if (this.installedBy == null) {
            if (o.installedBy != null)
                return false
        }
        else if (this.installedBy != o.installedBy)
            return false
        if (this.installedOn == null) {
            if (o.installedOn != null)
                return false
        }
        else if (this.installedOn != o.installedOn)
            return false
        if (this.executionTime == null) {
            if (o.executionTime != null)
                return false
        }
        else if (this.executionTime != o.executionTime)
            return false
        if (this.success == null) {
            if (o.success != null)
                return false
        }
        else if (this.success != o.success)
            return false
        return true
    }

    override fun hashCode(): Int {
        val prime = 31
        var result = 1
        result = prime * result + (if (this.installedRank == null) 0 else this.installedRank.hashCode())
        result = prime * result + (if (this.version == null) 0 else this.version.hashCode())
        result = prime * result + (if (this.description == null) 0 else this.description.hashCode())
        result = prime * result + (if (this.type == null) 0 else this.type.hashCode())
        result = prime * result + (if (this.script == null) 0 else this.script.hashCode())
        result = prime * result + (if (this.checksum == null) 0 else this.checksum.hashCode())
        result = prime * result + (if (this.installedBy == null) 0 else this.installedBy.hashCode())
        result = prime * result + (if (this.installedOn == null) 0 else this.installedOn.hashCode())
        result = prime * result + (if (this.executionTime == null) 0 else this.executionTime.hashCode())
        result = prime * result + (if (this.success == null) 0 else this.success.hashCode())
        return result
    }

    override fun toString(): String {
        val sb = StringBuilder("FlywaySchemaHistory (")

        sb.append(installedRank)
        sb.append(", ").append(version)
        sb.append(", ").append(description)
        sb.append(", ").append(type)
        sb.append(", ").append(script)
        sb.append(", ").append(checksum)
        sb.append(", ").append(installedBy)
        sb.append(", ").append(installedOn)
        sb.append(", ").append(executionTime)
        sb.append(", ").append(success)

        sb.append(")")
        return sb.toString()
    }
}
