6
0
Fork 0
release
李静 2021-12-11 11:53:29 +08:00
parent c93f48739e
commit 2c4d42c2f2
1 changed files with 26 additions and 0 deletions

View File

@ -94,6 +94,32 @@ class User extends Model implements AuthorizableContract, AuthenticatableContrac
return $this->hasMany(ShippingAddress::class);
}
/**
* 属于此用户的订单
*/
public function orders()
{
return $this->hasMany(Order::class);
}
/**
* 属于此用户的商品收藏记录
*/
public function skuFavorites()
{
return $this->hasMany(ProductSkuFavorite::class);
}
/**
* 确认此用户是否是 VIP
*
* @return bool
*/
public function isVip(): bool
{
return false;
}
/**
* 禁用用户
*