diff --git a/database.mwb b/database.mwb index ba250e8..71c7d85 100644 Binary files a/database.mwb and b/database.mwb differ diff --git a/lib/Component.lib.php b/lib/Component.lib.php index db10907..e6a778a 100644 --- a/lib/Component.lib.php +++ b/lib/Component.lib.php @@ -15,7 +15,7 @@ class Component implements JsonSerializable { $this->componentid = $componentid; if (Component::exists($componentid)) { $this->exists = true; - $this->component = $database->get("components", ["machineid", "serial", "typeid", "tested", "capacity", "model", "price", "manufacturer", "publicnotes", "privatenotes"], ["compid" => $componentid]); + $this->component = $database->get("components", ["machineid", "serial", "typeid [Int]", "tested", "capacity", "model", "price [Number]", "manufacturer", "publicnotes", "privatenotes"], ["compid" => $componentid]); } } diff --git a/lib/Machine.lib.php b/lib/Machine.lib.php index 3eb0073..a1744e9 100644 --- a/lib/Machine.lib.php +++ b/lib/Machine.lib.php @@ -20,8 +20,8 @@ class Machine implements JsonSerializable { $this->machineid = $machineid; if (Machine::exists($machineid)) { $this->exists = true; - $this->machine = $database->get('machines', ['type', 'model', 'condition', 'price', 'os', 'serial', 'manufacturer', 'clientid', 'privatenotes', 'publicnotes'], ['machineid' => $machineid]); - $typeinfo = $database->get("machine_types", ["machinetypeid (id)", "typename (label)", "icon"], ["machinetypeid" => $this->machine["type"]]); + $this->machine = $database->get('machines', ['type [Int]', 'model', 'condition [Number]', 'price [Number]', 'os', 'serial', 'manufacturer', 'clientid [Int]', 'privatenotes', 'publicnotes'], ['machineid' => $machineid]); + $typeinfo = $database->get("machine_types", ["machinetypeid (id) [Int]", "typename (label)", "icon"], ["machinetypeid" => $this->machine["type"]]); $this->icon = $typeinfo["icon"]; $this->typeid = $typeinfo["id"]; $this->typelabel = $typeinfo["label"];