update deploy

This commit is contained in:
bulut
2026-03-27 10:41:54 +03:00
parent 69d19c0176
commit 6f6448aa06
422 changed files with 37956 additions and 0 deletions

48
app/DTOs/ScheduleData.php Normal file
View File

@@ -0,0 +1,48 @@
<?php
namespace App\DTOs;
class ScheduleData
{
public function __construct(
public readonly int $courseId,
public readonly string $startDate,
public readonly string $endDate,
public readonly string $location,
public readonly int $quota,
public readonly int $availableSeats,
public readonly bool $isUrgent = false,
) {}
/**
* @param array<string, mixed> $data
*/
public static function fromArray(array $data): self
{
return new self(
courseId: $data['course_id'],
startDate: $data['start_date'],
endDate: $data['end_date'],
location: $data['location'],
quota: $data['quota'],
availableSeats: $data['available_seats'],
isUrgent: $data['is_urgent'] ?? false,
);
}
/**
* @return array<string, mixed>
*/
public function toArray(): array
{
return [
'course_id' => $this->courseId,
'start_date' => $this->startDate,
'end_date' => $this->endDate,
'location' => $this->location,
'quota' => $this->quota,
'available_seats' => $this->availableSeats,
'is_urgent' => $this->isUrgent,
];
}
}