示例#1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCaster()
 {
     return $this->hasOne(Caster::className(), ['id' => 'caster_id']);
 }
示例#2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCasters()
 {
     return $this->hasMany(Caster::className(), ['id' => 'caster_id'])->viaTable('{{%video_caster}}', ['video_id' => 'id']);
 }