|
- <?php
-
- namespace App\Kintone\Models\SubTable\PaymentPlan;
-
- use App\Kintone\Models\PaymentPlan;
- use App\Kintone\Models\SubTable\SubTableData;
-
- class Deposit extends SubTableData
- {
-
- public string $name;
- public int $amount;
-
-
- public function __construct(array $data = [])
- {
- $this->name = data_get($data, PaymentPlan::FIELD_DEPOSIT_LIST_NAME, "");
- $this->amount = data_get($data, PaymentPlan::FIELD_DEPOSIT_LIST_AMOUNT, 0);
-
- parent::__construct($data);
- }
-
- public function toArray(): array
- {
- return [
- PaymentPlan::FIELD_DEPOSIT_LIST_NAME => $this->name,
- PaymentPlan::FIELD_DEPOSIT_LIST_AMOUNT => $this->amount,
- ];
- }
- }
|