Update
parent
c93f48739e
commit
2c4d42c2f2
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用用户
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue