So far I have:
Hosts:
<?php
use Phalcon\Mvc\Model;
class Hosts extends Model
{
public $id;
public $name;
public $ip;
public $status;
public $proxyid;
public $port;
public function initialize()
{
$this->hasMany(
"id",
"HostsGroups",
"hostid"
);
}
}
Groups:
<?php
use Phalcon\Mvc\Model;
class Groups extends Model
{
public $id;
public $name;
public function initialize()
{
$this->hasMany(
"id",
"HostsGroups",
"groupid"
);
}
}
HostsGroups:
<?php
use Phalcon\Mvc\Model;
class HostsGroups extends Model
{
public $id;
public $hostid;
public $groupid;
public function initialize()
{
// Do I need anything here???
}
}