예제 #1
0
 public function __construct($config)
 {
     $this->device_id = $config['device_id'];
     $this->modelClass = Plan::className();
     array_shift($config);
     parent::__construct($config);
 }
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPlans()
 {
     return $this->hasMany(Plan::className(), ['device_id' => 'id']);
 }
예제 #3
0
파일: Day.php 프로젝트: czechcamus/dasport
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPlan()
 {
     return $this->hasOne(Plan::className(), ['id' => 'plan_id']);
 }