2020-10-19 22:10:28 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use App\Contracts\Model;
|
2020-10-22 01:28:54 +08:00
|
|
|
use Carbon\Carbon;
|
2020-10-19 22:10:28 +08:00
|
|
|
|
|
|
|
/**
|
2020-10-22 01:28:54 +08:00
|
|
|
* @property string name
|
|
|
|
* @property bool enabled
|
|
|
|
* @property Carbon created_at
|
|
|
|
* @property Carbon updated_at
|
2020-10-19 22:10:28 +08:00
|
|
|
*/
|
|
|
|
class Module extends Model
|
|
|
|
{
|
|
|
|
public $table = 'modules';
|
|
|
|
|
|
|
|
public $fillable = [
|
|
|
|
'name',
|
|
|
|
'enabled',
|
|
|
|
'created_at',
|
|
|
|
'updated_at',
|
|
|
|
];
|
|
|
|
|
|
|
|
protected $casts = [
|
|
|
|
'enabled' => 'boolean',
|
|
|
|
];
|
|
|
|
|
|
|
|
public static $rules = [
|
|
|
|
'name' => 'required',
|
|
|
|
];
|
|
|
|
}
|