feat : coupon
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user