['type' => 'text', 'required', 'unique', 'autoValMethod' => 'gen_ulid'], 'registered' => ['type' => 'datetime', 'required', 'unique', 'autoValMethod' => 'getDateTime'], 'name' => ['type' => 'text'], 'kennel_name' => ['type' => 'text'], 'breed' => ['type' => 'text'], 'size' => ['type' => 'text'], //in cm 'birthday' => ['type' => 'text'], 'agility_size' => ['type' => 'text'], //S,M,I,L 'photo' => ['type' => 'text'], 'active' => ['type' => 'int', 'default' => 1] ); function isMyDog($dog = false) { if ($dog == false) $dog = $this->id; if (!$this->exists($dog)) return false; else { if (in_array($dog, $_SESSION['user']->data['dogs'])) return true; else return false; } } }