Files
BarangaySystem/app/Models/FileContent.php
2026-06-06 18:43:00 +08:00

50 lines
953 B
PHP

<?php
declare(strict_types=1);
namespace App\Models;
class FileContent extends Model
{
protected ?string $table = 'file_content';
protected array $fillable = [
'hashkey',
'filehash',
'titlename',
'description',
'size_in_bytes',
'content',
'filelocation',
'created_by',
'updated_by',
'details',
'mimetype',
];
protected array $casts = [
'size_in_bytes' => 'integer',
'created_by' => 'integer',
'updated_by' => 'integer',
'details' => 'array'
];
/**
* Related file_list records
*/
public function fileLists()
{
return $this->hasMany(FileList::class, 'contentuid');
}
public function creator()
{
return $this->belongsTo(User::class, 'created_by');
}
public function updater()
{
return $this->belongsTo(User::class, 'updated_by');
}
}