Пример #1
0
 public function initialize()
 {
     parent::initialize();
     $this->belongsTo('advertiser_id', 'App\\Models\\Users', 'id', array('alias' => 'advertiser'));
     $this->hasManyToMany("id", 'App\\Models\\BannersZones', "banner_id", "zone_id", 'App\\Models\\Zones', "id", array('alias' => 'zones'));
     $this->hasMany('id', 'App\\Models\\Views', 'banner_id', array('alias' => 'views', 'foreignKey' => array('action' => \Phalcon\Mvc\Model\Relation::ACTION_CASCADE)));
 }
Пример #2
0
 public function initialize()
 {
     parent::initialize();
     $this->hasMany('id', __NAMESPACE__ . '\\Tokens', 'user_id', array('alias' => 'Tokens', 'foreignKey' => array('action' => \Phalcon\Mvc\Model\Relation::ACTION_CASCADE)));
 }
Пример #3
0
 public function __construct()
 {
     parent::__construct('relation');
 }
Пример #4
0
 public function __construct()
 {
     parent::__construct('user');
 }
Пример #5
0
 public function __construct()
 {
     parent::__construct('truck');
 }
Пример #6
0
 public function __construct()
 {
     parent::__construct('price');
 }
Пример #7
0
 public function __construct()
 {
     parent::__construct('product');
 }