50], [['total_sales', 'total_commission', 'total_score'], 'number'], ]; } /** * {@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', 'openid' => 'Openid', 'unionid' => 'Unionid', 'shop_id' => 'Shop ID', 'total_sales' => 'Total Sales', 'total_customers' => 'Total Customers', 'bind_at' => 'Bind At', 'invite_at' => 'Invite At', ]; } public function getUser(){ return $this->hasOne(User::class, ['id' => 'user_id'])->select('id, username, nickname, avatar_url, mobile'); } public function getShop(){ return $this->hasOne(WechatVideoShop::class, ['id' => 'shop_id']); } public function getLevel() { return $this->hasOne(WechatVideoShopLevel::class, ['level' => 'level']); } }