升级节日福利年度调度与批次领取

This commit is contained in:
2026-04-21 17:53:11 +08:00
parent 5a6446b832
commit a066580014
25 changed files with 2362 additions and 536 deletions
+12
View File
@@ -15,12 +15,16 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* 类功能:记录用户在某个节日福利发放批次中的领取状态。
*/
class HolidayClaim extends Model
{
public $timestamps = false;
protected $fillable = [
'event_id',
'run_id',
'user_id',
'amount',
'claimed_at',
@@ -45,6 +49,14 @@ class HolidayClaim extends Model
return $this->belongsTo(HolidayEvent::class, 'event_id');
}
/**
* 关联所属发放批次。
*/
public function run(): BelongsTo
{
return $this->belongsTo(HolidayEventRun::class, 'run_id');
}
/**
* 关联领取用户。
*/