mdn-backend / app /Domain /Files /FileLinkRepository.php
internationalscholarsprogram's picture
feat(care): Peter b104020 — expand Care lifecycle, 17 new routes, migration
bdec7a7
Raw
History Blame Contribute Delete
766 Bytes
<?php
namespace App\Domain\Files;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
class FileLinkRepository
{
public const TARGET_COLUMNS = [
'application_id',
'membership_id',
'product_request_id',
'contract_id',
'support_case_id',
'care_enrollment_id',
'care_person_id',
'care_claim_id',
'care_beneficiary_id',
'real_estate_partner_id',
'marketplace_vendor_id',
];
public function create(array $attributes): string
{
$now = Carbon::now();
DB::table('file_links')->insert(array_merge($attributes, [
'created_at' => $now,
'updated_at' => $now,
]));
return $attributes['id'];
}
}