<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;use Illuminate\Database\Eloquent\MassPrunable;use Illuminate\Database\Eloquent\Model;
class RedemptionAttempt extends Model {use MassPrunable;public $timestamps=false;protected $fillable=['user_id','merchant_id','credential_fingerprint','ip','outcome','created_at'];protected function casts():array{return ['created_at'=>'datetime'];}public function prunable():Builder{return static::where('created_at','<',now()->subDays(90));}protected static function booted():void{static::updating(fn()=>throw new \LogicException('Redemption attempts are immutable.'));static::deleting(fn()=>throw new \LogicException('Redemption attempts are immutable.'));}}
