reconstruction of the project
This commit is contained in:
@@ -2,11 +2,15 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\BaseModel;
|
||||
|
||||
class ClassProgressAttachment extends Model
|
||||
class ClassProgressAttachment extends BaseModel
|
||||
{
|
||||
protected $table = 'class_progress_attachments';
|
||||
|
||||
// CI: useTimestamps = false
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'report_id',
|
||||
'file_path',
|
||||
@@ -15,5 +19,16 @@ class ClassProgressAttachment extends Model
|
||||
'file_size',
|
||||
'created_at',
|
||||
];
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'report_id' => 'integer',
|
||||
'file_size' => 'integer',
|
||||
];
|
||||
|
||||
// Optional relationship
|
||||
public function report()
|
||||
{
|
||||
// replace ClassProgressReport::class with your actual report model if different
|
||||
return $this->belongsTo(ClassProgressReport::class, 'report_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user