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

com.tairitsu.ignotus.database.model.table.BaseLongIdTable.kt Maven / Gradle / Ivy

The newest version!
package com.tairitsu.ignotus.database.model.table

import org.jetbrains.exposed.dao.id.LongIdTable
import org.jetbrains.exposed.sql.javatime.datetime
import java.time.LocalDateTime

/**
 * Reference: https://github.com/paulkagiri/ExposedDatesAutoFill
 */
abstract class BaseLongIdTable(name: String) : LongIdTable(name) {
    val createdAt = datetime("created_at").clientDefault { LocalDateTime.now() }
    val updatedAt = datetime("updated_at").nullable()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy