/** * @return \yii\db\ActiveQuery */ public function getGoodsT() { \app\models\GoodsT::$tabName = 'goods_t_' . $this->goods_type_type; return \app\models\GoodsT::findOne($this->id); }
public static function find($type, $cond, $params) { \app\models\GoodsT::$tabName = self::$goodTablePefix . $type; return \app\models\GoodsT::find()->where($cond, $params); }