import { toJS } from "mobx";
import {
  model,
  Model,
  ModelAutoTypeCheckingMode,
  setGlobalConfig,
  tProp,
  types,
} from "mobx-keystone";

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

@model("keystone/Remote/Acs01/Aux")
export default class Aux extends Model({
  id: tProp(types.string),
  display_on_control_page: tProp(types.boolean),
  io: tProp(types.number),
  moduleid: tProp(types.string),
  name: tProp(types.string),
  pulse_time: tProp(types.number),
  schedule: tProp(types.string),
  schedule_action: tProp(types.number),
  type: tProp(types.number),
}) {
  get self() {
    return toJS(this);
  }
}
