feat(ticket): implement refund functionality and expose allow_refund flag

This commit is contained in:
2026-09-10 17:05:57 -03:00
parent 210c854fee
commit 5d00dc439e
8 changed files with 273 additions and 0 deletions

View File

@@ -135,6 +135,21 @@ class Ticket extends Model
return $this->belongsTo(Tenant::class, 'tenant_code', 'codigo');
}
public function allow_refund(): bool
{
return $this->tenant?->allow_refund() ?? false;
}
public function allowRefund(): bool
{
return $this->allow_refund();
}
public function getAllowRefundAttribute(): bool
{
return $this->allow_refund();
}
/** @return BelongsTo<User, $this> */
public function user(): BelongsTo
{