Changes to import and notifications

This commit is contained in:
Simon Pocrnjič
2025-10-13 21:14:10 +02:00
parent 0bbed64542
commit 79b3e20b02
28 changed files with 2173 additions and 438 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ActivityNotificationRead extends Model
{
//
protected $fillable = [
'user_id', 'activity_id', 'due_date', 'read_at',
];
protected $casts = [
'due_date' => 'date',
'read_at' => 'datetime',
];
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(User::class);
}
public function activity(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(Activity::class);
}
}
+2 -1
View File
@@ -12,7 +12,7 @@ class Import extends Model
use HasFactory;
protected $fillable = [
'uuid', 'user_id', 'import_template_id', 'client_id', 'source_type', 'file_name', 'original_name', 'disk', 'path', 'size', 'sheet_name', 'status', 'reactivate', 'total_rows', 'valid_rows', 'invalid_rows', 'imported_rows', 'started_at', 'finished_at', 'failed_at', 'error_summary', 'meta',
'uuid', 'user_id', 'import_template_id', 'client_id', 'source_type', 'file_name', 'original_name', 'disk', 'path', 'size', 'sheet_name', 'status', 'reactivate', 'show_missing', 'total_rows', 'valid_rows', 'invalid_rows', 'imported_rows', 'started_at', 'finished_at', 'failed_at', 'error_summary', 'meta',
];
protected $casts = [
@@ -22,6 +22,7 @@ class Import extends Model
'finished_at' => 'datetime',
'failed_at' => 'datetime',
'reactivate' => 'boolean',
'show_missing' => 'boolean',
];
public function user(): BelongsTo