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


import java.io.Serializable
import java.time.OffsetDateTime


/**
 * This class is generated by jOOQ.
 */
@Suppress("UNCHECKED_CAST")
data class Article(
    var id: Long? = null,
    var created: OffsetDateTime? = null,
    var updated: OffsetDateTime? = null,
    var updatedBy: Long? = null,
    var createdBy: Long? = null,
    var status: String? = null,
    var title: String? = null,
    var originalId: Long? = null,
    var language: String? = null,
    var url: String? = null,
    var content: String? = null,
    var thumbnail: String? = null,
    var published: OffsetDateTime? = null,
    var version: Long? = 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: Article = other as Article
        if (this.id == null) {
            if (o.id != null)
                return false
        }
        else if (this.id != o.id)
            return false
        if (this.created == null) {
            if (o.created != null)
                return false
        }
        else if (this.created != o.created)
            return false
        if (this.updated == null) {
            if (o.updated != null)
                return false
        }
        else if (this.updated != o.updated)
            return false
        if (this.updatedBy == null) {
            if (o.updatedBy != null)
                return false
        }
        else if (this.updatedBy != o.updatedBy)
            return false
        if (this.createdBy == null) {
            if (o.createdBy != null)
                return false
        }
        else if (this.createdBy != o.createdBy)
            return false
        if (this.status == null) {
            if (o.status != null)
                return false
        }
        else if (this.status != o.status)
            return false
        if (this.title == null) {
            if (o.title != null)
                return false
        }
        else if (this.title != o.title)
            return false
        if (this.originalId == null) {
            if (o.originalId != null)
                return false
        }
        else if (this.originalId != o.originalId)
            return false
        if (this.language == null) {
            if (o.language != null)
                return false
        }
        else if (this.language != o.language)
            return false
        if (this.url == null) {
            if (o.url != null)
                return false
        }
        else if (this.url != o.url)
            return false
        if (this.content == null) {
            if (o.content != null)
                return false
        }
        else if (this.content != o.content)
            return false
        if (this.thumbnail == null) {
            if (o.thumbnail != null)
                return false
        }
        else if (this.thumbnail != o.thumbnail)
            return false
        if (this.published == null) {
            if (o.published != null)
                return false
        }
        else if (this.published != o.published)
            return false
        if (this.version == null) {
            if (o.version != null)
                return false
        }
        else if (this.version != o.version)
            return false
        return true
    }

    override fun hashCode(): Int {
        val prime = 31
        var result = 1
        result = prime * result + (if (this.id == null) 0 else this.id.hashCode())
        result = prime * result + (if (this.created == null) 0 else this.created.hashCode())
        result = prime * result + (if (this.updated == null) 0 else this.updated.hashCode())
        result = prime * result + (if (this.updatedBy == null) 0 else this.updatedBy.hashCode())
        result = prime * result + (if (this.createdBy == null) 0 else this.createdBy.hashCode())
        result = prime * result + (if (this.status == null) 0 else this.status.hashCode())
        result = prime * result + (if (this.title == null) 0 else this.title.hashCode())
        result = prime * result + (if (this.originalId == null) 0 else this.originalId.hashCode())
        result = prime * result + (if (this.language == null) 0 else this.language.hashCode())
        result = prime * result + (if (this.url == null) 0 else this.url.hashCode())
        result = prime * result + (if (this.content == null) 0 else this.content.hashCode())
        result = prime * result + (if (this.thumbnail == null) 0 else this.thumbnail.hashCode())
        result = prime * result + (if (this.published == null) 0 else this.published.hashCode())
        result = prime * result + (if (this.version == null) 0 else this.version.hashCode())
        return result
    }

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

        sb.append(id)
        sb.append(", ").append(created)
        sb.append(", ").append(updated)
        sb.append(", ").append(updatedBy)
        sb.append(", ").append(createdBy)
        sb.append(", ").append(status)
        sb.append(", ").append(title)
        sb.append(", ").append(originalId)
        sb.append(", ").append(language)
        sb.append(", ").append(url)
        sb.append(", ").append(content)
        sb.append(", ").append(thumbnail)
        sb.append(", ").append(published)
        sb.append(", ").append(version)

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