/** * 定义与ActivityProductStat的关联关系 */ public function getApstat() { return $this->hasOne(ActivityProductStat::className(), ['rel_id' => 'id']); }