initial: bootstrap from BukidBountyApp base
This commit is contained in:
51
app/Models/DbBackup.php
Normal file
51
app/Models/DbBackup.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $hashkey
|
||||
* @property string $file_content_hashkey
|
||||
* @property string $filename
|
||||
* @property int $size_in_bytes
|
||||
* @property bool $is_active
|
||||
* @property int $created_by
|
||||
* @property int $updated_by
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
*/
|
||||
class DbBackup extends Model
|
||||
{
|
||||
protected ?string $table = 'db_backups';
|
||||
|
||||
protected array $fillable = [
|
||||
'hashkey',
|
||||
'name',
|
||||
'file_content_hashkey',
|
||||
'filename',
|
||||
'size_in_bytes',
|
||||
'is_active',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
];
|
||||
|
||||
protected array $casts = [
|
||||
'id' => 'integer',
|
||||
'size_in_bytes' => 'integer',
|
||||
'is_active' => 'boolean',
|
||||
'created_by' => 'integer',
|
||||
'updated_by' => 'integer',
|
||||
];
|
||||
|
||||
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