feat : coupon

This commit is contained in:
2025-02-27 15:32:36 +08:00
parent 81bc1d5456
commit d046b34cea
11 changed files with 338 additions and 17 deletions

View File

@@ -39,4 +39,13 @@ class UserCoupon extends Model
const string CREATED_AT = 'created_time';
const string UPDATED_AT = 'updated_time';
public function getReceiveCountByUserIds(int $user_id,array $couponIdArr): array
{
return $this
->where('user_id', $user_id)
->whereIn('coupon_id', $couponIdArr)
->pluck('coupon_id')
->toArray();
}
}