/*
 * 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 Vacancy(
    var id: Long? = null,
    var title: String? = null,
    var location: String? = null,
    var companyId: Long? = null,
    var kotlinerId: Long? = null,
    var workplace: String? = null,
    var employment: String? = null,
    var salary: String? = null,
    var contact: String? = null,
    var description: String? = null,
    var created: OffsetDateTime? = 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: Vacancy = other as Vacancy
        if (this.id == null) {
            if (o.id != null)
                return false
        }
        else if (this.id != o.id)
            return false
        if (this.title == null) {
            if (o.title != null)
                return false
        }
        else if (this.title != o.title)
            return false
        if (this.location == null) {
            if (o.location != null)
                return false
        }
        else if (this.location != o.location)
            return false
        if (this.companyId == null) {
            if (o.companyId != null)
                return false
        }
        else if (this.companyId != o.companyId)
            return false
        if (this.kotlinerId == null) {
            if (o.kotlinerId != null)
                return false
        }
        else if (this.kotlinerId != o.kotlinerId)
            return false
        if (this.workplace == null) {
            if (o.workplace != null)
                return false
        }
        else if (this.workplace != o.workplace)
            return false
        if (this.employment == null) {
            if (o.employment != null)
                return false
        }
        else if (this.employment != o.employment)
            return false
        if (this.salary == null) {
            if (o.salary != null)
                return false
        }
        else if (this.salary != o.salary)
            return false
        if (this.contact == null) {
            if (o.contact != null)
                return false
        }
        else if (this.contact != o.contact)
            return false
        if (this.description == null) {
            if (o.description != null)
                return false
        }
        else if (this.description != o.description)
            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
        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.title == null) 0 else this.title.hashCode())
        result = prime * result + (if (this.location == null) 0 else this.location.hashCode())
        result = prime * result + (if (this.companyId == null) 0 else this.companyId.hashCode())
        result = prime * result + (if (this.kotlinerId == null) 0 else this.kotlinerId.hashCode())
        result = prime * result + (if (this.workplace == null) 0 else this.workplace.hashCode())
        result = prime * result + (if (this.employment == null) 0 else this.employment.hashCode())
        result = prime * result + (if (this.salary == null) 0 else this.salary.hashCode())
        result = prime * result + (if (this.contact == null) 0 else this.contact.hashCode())
        result = prime * result + (if (this.description == null) 0 else this.description.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())
        return result
    }

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

        sb.append(id)
        sb.append(", ").append(title)
        sb.append(", ").append(location)
        sb.append(", ").append(companyId)
        sb.append(", ").append(kotlinerId)
        sb.append(", ").append(workplace)
        sb.append(", ").append(employment)
        sb.append(", ").append(salary)
        sb.append(", ").append(contact)
        sb.append(", ").append(description)
        sb.append(", ").append(created)
        sb.append(", ").append(updated)

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