30], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'mall_id' => 'Mall ID', 'status' => 'Status', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'user_id' => 'User ID', 'order_id' => 'Order ID', 'order_no' => 'Order No', 'third_order_id' => 'Third Order ID', 'content' => 'Content', 'third_order_status' => 'Third Order Status', ]; } /** * 获取订单 * @return \yii\db\ActiveQuery */ public function getOrder() { return $this->hasOne(Order::class, ['id' => 'order_id']); } public function getShop() { return $this->hasOne(WechatVideoShop::class, ['id' => 'shop_id']); } public function getUser() { return $this->hasOne(User::class, ['id' => 'user_id']); } /** * @return \yii\db\ActiveQuery */ public function getSharer() { return $this->hasOne(WechatVideoShopSharer::class, ['user_id' => 'parent_id'])->where(['status' => StatusEnum::ENABLED]); } }