Files
alrahma_sunday_school_api/app/Http/Resources/Discounts/DiscountVoucherResource.php
T
2026-03-09 02:52:13 -04:00

27 lines
791 B
PHP

<?php
namespace App\Http\Resources\Discounts;
use Illuminate\Http\Resources\Json\JsonResource;
class DiscountVoucherResource extends JsonResource
{
public function toArray($request): array
{
return [
'id' => $this->id,
'code' => $this->code,
'discount_type' => $this->discount_type,
'discount_value' => $this->discount_value,
'max_uses' => $this->max_uses,
'times_used' => $this->times_used,
'valid_from' => $this->valid_from,
'valid_until' => $this->valid_until,
'is_active' => (bool) $this->is_active,
'description' => $this->description,
'school_year' => $this->school_year,
'semester' => $this->semester,
];
}
}