Files
animethemes-server/app/Models/Admin/Dump.php
T
paranarimasu 1d93000c6f feat(admin): migrate db dumps from github to platform (#463)
* feat(admin): migrate db dumps from github to platform

* style: fix StyleCI findings
2022-09-18 22:31:29 -05:00

79 lines
1.5 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Models\Admin;
use App\Events\Admin\Dump\DumpCreated;
use App\Events\Admin\Dump\DumpDeleted;
use App\Events\Admin\Dump\DumpRestored;
use App\Events\Admin\Dump\DumpUpdated;
use App\Models\BaseModel;
use Database\Factories\Admin\DumpFactory;
use Laravel\Nova\Actions\Actionable;
/**
* Class Dump.
*
* @property int $dump_id
* @property string $path
*
* @method static DumpFactory factory(...$parameters)
*/
class Dump extends BaseModel
{
use Actionable;
final public const TABLE = 'dumps';
final public const ATTRIBUTE_ID = 'dump_id';
final public const ATTRIBUTE_PATH = 'path';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
Dump::ATTRIBUTE_PATH,
];
/**
* The event map for the model.
*
* Allows for object-based events for native Eloquent events.
*
* @var array
*/
protected $dispatchesEvents = [
'created' => DumpCreated::class,
'deleted' => DumpDeleted::class,
'restored' => DumpRestored::class,
'updated' => DumpUpdated::class,
];
/**
* The table associated with the model.
*
* @var string
*/
protected $table = Dump::TABLE;
/**
* The primary key associated with the table.
*
* @var string
*/
protected $primaryKey = Dump::ATTRIBUTE_ID;
/**
* Get name.
*
* @return string
*/
public function getName(): string
{
return $this->path;
}
}