import { DateTime } from 'luxon'
import { BaseModel, column } from '@ioc:Adonis/Lucid/Orm'

export default class KeyValue extends BaseModel {

  public static table = 'key_values'

  @column({ isPrimary: true })
  public id_key: number

  @column()
  public key: string

  @column()
  public value: string

  @column()
  public model: string

  @column.dateTime({ autoCreate: true })
  public created_at: DateTime

  @column.dateTime({ autoCreate: true, autoUpdate: true })
  public updated_at: DateTime
}
