255], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'good_id' => 'Good ID', 'store_id' => 'Store ID', 'is_delete' => 'Is Delete', 'type' => 'Type', 'addtime' => 'Addtime', ]; } public function getUsers() { // return $this->hasMany(GwdLikeUser::className(), ['like_id' => 'id']); return $this->hasMany(User::className(), ['id' => 'user_id']) ->via('glu'); } public function getGlu() { return $this->hasMany(GwdLikeUser::className(), ['like_id' => 'id']); } public function getGood() { return $this->hasOne(Goods::className(), ['id' => 'good_id']); } }