Initial Ladill Transfer app — file sharing with QR links.
Scaffolded from the Ladill mini/events extraction pattern: multi-file transfers, retention controls, public landing pages, analytics, and Gitea deploy workflow. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class TransferDownloadEvent extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'transfer_id',
|
||||
'transfer_file_id',
|
||||
'downloaded_at',
|
||||
'ip_hash',
|
||||
'user_agent',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'downloaded_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function transfer(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Transfer::class);
|
||||
}
|
||||
|
||||
public function file(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(TransferFile::class, 'transfer_file_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user