Publication initiale de RelaisSMS : documentation et sources nettoyees

This commit is contained in:
2026-10-21 09:29:39 +02:00
commit ac186b03b1
158 changed files with 24818 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
#[Fillable([
'sms_campaign_id',
'contact_id',
'contact_phone_number_id',
'contact_name',
'number',
'status',
'provider_message_id',
'provider_response',
'error_message',
'sent_at',
])]
class SmsDelivery extends Model
{
/**
* @return BelongsTo<SmsCampaign, $this>
*/
public function campaign(): BelongsTo
{
return $this->belongsTo(SmsCampaign::class, 'sms_campaign_id');
}
/**
* @return BelongsTo<Contact, $this>
*/
public function contact(): BelongsTo
{
return $this->belongsTo(Contact::class);
}
/**
* @return BelongsTo<ContactPhoneNumber, $this>
*/
public function phoneNumber(): BelongsTo
{
return $this->belongsTo(ContactPhoneNumber::class, 'contact_phone_number_id');
}
protected function casts(): array
{
return [
'provider_response' => 'array',
'sent_at' => 'datetime',
];
}
}