Extract Ladill Events as a standalone events suite at events.ladill.com.
Deploy Ladill QR Plus / deploy (push) Successful in 28s
Deploy Ladill QR Plus / deploy (push) Successful in 28s
Full control center for ticketed events, contributions, attendees, badges, and programmes — not a QR utility clone. Includes SSO shell, import command, and platform cutover runbook. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class QrEventRegistration extends Model
|
||||
{
|
||||
public const STATUS_PENDING = 'pending';
|
||||
public const STATUS_CONFIRMED = 'confirmed';
|
||||
public const STATUS_FAILED = 'failed';
|
||||
public const STATUS_CANCELLED = 'cancelled';
|
||||
|
||||
protected $fillable = [
|
||||
'qr_code_id',
|
||||
'user_id',
|
||||
'reference',
|
||||
'badge_code',
|
||||
'tier_name',
|
||||
'amount_minor',
|
||||
'currency',
|
||||
'attendee_name',
|
||||
'attendee_email',
|
||||
'attendee_phone',
|
||||
'badge_fields',
|
||||
'status',
|
||||
'payment_reference',
|
||||
'paid_at',
|
||||
'checked_in_at',
|
||||
'metadata',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'badge_fields' => 'array',
|
||||
'metadata' => 'array',
|
||||
'amount_minor' => 'integer',
|
||||
'paid_at' => 'datetime',
|
||||
'checked_in_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function qrCode(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(QrCode::class);
|
||||
}
|
||||
|
||||
public function organizer(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id');
|
||||
}
|
||||
|
||||
public function amountCedis(): float
|
||||
{
|
||||
return round($this->amount_minor / 100, 2);
|
||||
}
|
||||
|
||||
public function isPaid(): bool
|
||||
{
|
||||
return $this->amount_minor > 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user