/*
 * 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 DmLikes(
    var entityId: Long? = null,
    var likes: Int? = null,
    var dislikes: Int? = null,
    var updated: OffsetDateTime? = 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: DmLikes = other as DmLikes
        if (this.entityId == null) {
            if (o.entityId != null)
                return false
        }
        else if (this.entityId != o.entityId)
            return false
        if (this.likes == null) {
            if (o.likes != null)
                return false
        }
        else if (this.likes != o.likes)
            return false
        if (this.dislikes == null) {
            if (o.dislikes != null)
                return false
        }
        else if (this.dislikes != o.dislikes)
            return false
        if (this.updated == null) {
            if (o.updated != null)
                return false
        }
        else if (this.updated != o.updated)
            return false
        return true
    }

    override fun hashCode(): Int {
        val prime = 31
        var result = 1
        result = prime * result + (if (this.entityId == null) 0 else this.entityId.hashCode())
        result = prime * result + (if (this.likes == null) 0 else this.likes.hashCode())
        result = prime * result + (if (this.dislikes == null) 0 else this.dislikes.hashCode())
        result = prime * result + (if (this.updated == null) 0 else this.updated.hashCode())
        return result
    }

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

        sb.append(entityId)
        sb.append(", ").append(likes)
        sb.append(", ").append(dislikes)
        sb.append(", ").append(updated)

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