All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.firefly.example.kotlin.coffee.store.model.User.kt Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
package com.firefly.example.kotlin.coffee.store.model

import com.firefly.db.annotation.Column
import com.firefly.db.annotation.Id
import com.firefly.db.annotation.Table
import java.util.*

/**
 * @author Pengtao Qiu
 */
@Table(value = "user", catalog = "coffee_store")
data class User(
    @Id("id") var id: Long?,
    @Column("name") var name: String,
    @Column("password") var password: String,
    @Column("create_time") var createTime: Date?,
    @Column("update_time") var updateTime: Date?
               ) {

    override fun equals(other: Any?): Boolean = if (other is User) Objects.equals(id, other.id) else false

    override fun hashCode(): Int = Objects.hashCode(id)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy