package model

import (
	"time"
)

type HistoryAction string

var (
	// HistoryActionCreate is the action of create
	HistoryActionCreate HistoryAction = "CREATE"
	// HistoryActionUpdate is the action of update
	HistoryActionUpdate HistoryAction = "UPDATE"
	// HistoryActionDelete is the action of delete
	HistoryActionDelete HistoryAction = "DELETE"
)

type HistoryRecord struct {
	Action         HistoryAction `json:"action" db:"action"`
	Revision       ID            `json:"revision" db:"revision"`
	CreatedAt      time.Time     `json:"createdAt" db:"created_at"`
	UserIDAndEmail `json:"user"`
}
