catchAdmin/modules/Permissions/Models/DepartmentsModel.php

51 lines
1.1 KiB
PHP
Raw Normal View History

2022-12-07 19:28:57 +08:00
<?php
declare(strict_types=1);
namespace Modules\Permissions\Models;
use Catch\Base\CatchModel as Model;
/**
* @property $id
* @property $parent_id
* @property $department_name
* @property $principal
* @property $mobile
* @property $email
* @property $status
* @property $sort
* @property $creator_id
* @property $created_at
* @property $updated_at
* @property $deleted_at
*/
class DepartmentsModel extends Model
{
protected $table = 'departments';
protected $fillable = ['id', 'parent_id', 'department_name', 'principal', 'mobile', 'email', 'status', 'sort', 'creator_id', 'created_at', 'updated_at', 'deleted_at'];
2022-12-14 19:25:52 +08:00
protected bool $isPaginate = false;
2022-12-07 19:28:57 +08:00
/**
* @var array
*/
2022-12-14 19:25:52 +08:00
protected array $fields = ['id','parent_id','department_name','status','sort','created_at'];
2022-12-07 19:28:57 +08:00
/**
* @var array
*/
protected array $form = ['parent_id','department_name','principal','mobile','email','sort'];
/**
* @var array
*/
public array $searchable = [
'department_name' => 'like',
'status' => '=',
];
2022-12-14 19:25:52 +08:00
protected bool $asTree = true;
2022-12-07 19:28:57 +08:00
}