AuditTable

A table mixin that provides full audit trail functionality. Combines TimestampTable (createdAt, updatedAt) with SoftDeletableTable (deletedAt) and adds creator/modifier tracking.

Use this for tables where you need complete audit history including who created/modified records.

Example:

class UserTable(pluginId: String) : PluginTable(pluginId, "users"), AuditTable {
val id = integer("id").autoIncrement()
val name = varchar("name", 100)
// AuditTable provides: createdAt, updatedAt, deletedAt, createdBy, updatedBy
}

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val createdAt: Column<Instant>

The column storing when the record was created. This is set automatically on insert.

Link copied to clipboard
abstract val createdBy: Column<String?>

The column storing who created the record. This could be a user ID, username, or system identifier.

Link copied to clipboard
abstract val deletedAt: Column<Instant?>

The column storing the deletion timestamp.

Link copied to clipboard
abstract val updatedAt: Column<Instant>

The column storing when the record was last updated. This is automatically updated on insert and update.

Link copied to clipboard
abstract val updatedBy: Column<String?>

The column storing who last modified the record. This could be a user ID, username, or system identifier.