initial: bootstrap from BukidBountyApp base
This commit is contained in:
49
app/Models/FileContent.php
Normal file
49
app/Models/FileContent.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user