/** * @return \yii\db\ActiveQuery */ public function getGoods() { return $this->hasMany(Goods::className(), ['sex_id' => 'id']); }
public function getGoods() { return $this->hasOne(Goods::className(), ['goods_id' => 'goods_id'])->asArray(); }
/** * @return \yii\db\ActiveQuery */ public function getGoods() { return $this->hasMany(Goods::className(), ['goods_type_type' => 'type']); }