Aplikasi Keuangan yang mengatur lalu lintas transaksi antara bank dan aplikasi internal Kampus
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

36 lines
962 B

<?php
namespace App\Domains\Finance\DTOs\PaymentProcessing\Detail;
class StudentInvoiceDetailDTO implements InvoiceDetailDTO
{
public function __construct(
public string $studentId,
public string $studentName,
public string $faculty,
public string $studyProgram,
public string $term,
) {}
public function toArray(): array
{
return [
'student_id' => $this->studentId,
'student_name' => $this->studentName,
'faculty' => $this->faculty,
'study_program' => $this->studyProgram,
'term' => $this->term,
];
}
public static function fromArray(array $data): self
{
return new self(
studentId: $data['student_id'],
studentName: $data['student_name'],
faculty: $data['faculty'],
studyProgram: $data['study_program'],
term: $data['term'],
);
}
}