mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-14 19:40:53 +08:00
feat: add user deletion functionality and fix known issues
This commit is contained in:
@@ -24,17 +24,4 @@ class Coupon extends Model
|
||||
})->toArray();
|
||||
}
|
||||
|
||||
public function getLimitPlanIdsAttribute($value)
|
||||
{
|
||||
$planIds = json_decode($value, true);
|
||||
|
||||
if (blank($planIds)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return collect($planIds)
|
||||
->map(fn($id) => (string) $id)
|
||||
->values()
|
||||
->all();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,16 @@ class User extends Authenticatable
|
||||
return $this->hasMany(InviteCode::class, 'user_id', 'id');
|
||||
}
|
||||
|
||||
public function orders()
|
||||
{
|
||||
return $this->hasMany(Order::class, 'user_id', 'id');
|
||||
}
|
||||
|
||||
public function stat()
|
||||
{
|
||||
return $this->hasMany(StatUser::class, 'user_id', 'id');
|
||||
}
|
||||
|
||||
// 关联工单列表
|
||||
public function tickets()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user