reconstruction of the project

This commit is contained in:
root
2026-03-08 16:33:24 -04:00
parent 23b7db1107
commit c8de5f7edc
9157 changed files with 77877 additions and 1073823 deletions
+30 -3
View File
@@ -2,11 +2,15 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\BaseModel;
class CommunicationLog extends Model
class CommunicationLog extends BaseModel
{
protected $table = 'communication_logs';
// CI model didn't enable timestamps; keep off unless your table has created_at/updated_at.
public $timestamps = false;
protected $fillable = [
'student_id',
'family_id',
@@ -23,5 +27,28 @@ class CommunicationLog extends Model
'sent_by',
'metadata',
];
public $timestamps = false;
protected $casts = [
'student_id' => 'integer',
'family_id' => 'integer',
'sent_by' => 'integer',
// If these columns are JSON in DB, this will auto convert to arrays
'recipients' => 'array',
'cc' => 'array',
'bcc' => 'array',
'attachments' => 'array',
'metadata' => 'array',
];
/* Optional relationships */
public function student()
{
return $this->belongsTo(Student::class, 'student_id');
}
public function sender()
{
return $this->belongsTo(User::class, 'sent_by');
}
}