From fddd9fea60e8440980adc1ca36d29ec5b72723ec Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Tue, 10 Dec 2019 15:09:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=A2=E5=8D=95=E8=A1=A8?= =?UTF-8?q?=E5=92=8C=E8=AE=A2=E5=8D=95=E5=95=86=E5=93=81=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E5=85=B3=E8=81=94=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/modules/shop/models/ars/OrderGoods.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/modules/shop/models/ars/OrderGoods.php b/backend/modules/shop/models/ars/OrderGoods.php index 2c08e76..80eb117 100755 --- a/backend/modules/shop/models/ars/OrderGoods.php +++ b/backend/modules/shop/models/ars/OrderGoods.php @@ -4,6 +4,7 @@ namespace backend\modules\shop\models\ars; use Yii; use yii\behaviors\TimestampBehavior; +use backend\modules\shop\models\ars\Order; /** * This is the model class for table "ats_order_goods". @@ -87,4 +88,9 @@ class OrderGoods extends \yii\db\ActiveRecord ], ]; } + + public function getOrder() + { + return $this->hasOne(Order::className(), ['id' => 'order_id']); + } }