30] ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'status' => 'Status', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'mall_id' => 'Mall ID', 'user_id' => 'User ID', 'head_id' => 'Head ID', 'order_id' => 'Order ID', 'buyer_user_id' => 'Buyer User ID', ]; } /** * @return ActiveQuery */ public function getOrder(): ActiveQuery { return $this->hasOne(Order::class, ['id' => 'order_id']); } /** * @return ActiveQuery */ public function getHead(): ActiveQuery { return $this->hasOne(CommunityHead::class, ['id' => 'head_id']); } /** * @return ActiveQuery */ public function getHeadUser(): ActiveQuery { return $this->hasOne(User::class, ['id' => 'user_id'])->select('id, avatar_url, mobile, nickname'); } /** * @return ActiveQuery */ public function getBuyer(): ActiveQuery { return $this->hasOne(User::class, ['id' => 'buyer_user_id'])->select('id, avatar_url, mobile, nickname'); } }