import {
  model,
  Model,
  ModelAutoTypeCheckingMode,
  setGlobalConfig,
  tProp,
  types,
} from "mobx-keystone";
import { v4 as uuidv4 } from "uuid";

setGlobalConfig({
  modelAutoTypeChecking: ModelAutoTypeCheckingMode.AlwaysOn,
});

@model('keystone/Logs/Log')
export default class Log extends Model({
  id: tProp(types.string, () => uuidv4()),
  date: tProp(types.number, () => new Date().getTime()),
  type: tProp(types.string),
  subType: tProp(types.string),
  name: tProp(types.string),
  reason: tProp(types.string),
  user: tProp(types.string),
}) {}
