Spaces:
Running
Running
| 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']; | |
| } | |
| } | |