예제 #1
0
 /**
  * 定义与ActivityProduct的关联关系
  */
 public function getAproduct()
 {
     return $this->hasMany(ActivityProduct::className(), ['product_id' => 'id']);
 }
예제 #2
0
 /**
  * 与中国好产品活动的关系
  */
 public function getAct()
 {
     return $this->hasOne(ActivityProduct::className(), ['id' => 'owner_id']);
 }