[运营]公告
This commit is contained in:
31
app/admin/controller/operation/OperationNotice.php
Normal file
31
app/admin/controller/operation/OperationNotice.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\operation;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
use support\Response;
|
||||
use Webman\Http\Request as WebmanRequest;
|
||||
|
||||
/**
|
||||
* 运营公告
|
||||
*/
|
||||
class OperationNotice extends Backend
|
||||
{
|
||||
protected ?object $model = null;
|
||||
|
||||
protected string|array $preExcludeFields = ['id', 'create_time', 'update_time'];
|
||||
|
||||
protected string|array $quickSearchField = ['id', 'title'];
|
||||
|
||||
protected string|array $defaultSortField = ['id' => 'desc'];
|
||||
|
||||
protected string|array $orderGuarantee = ['id' => 'desc'];
|
||||
|
||||
protected bool $modelValidate = false;
|
||||
|
||||
protected function initController(WebmanRequest $request): ?Response
|
||||
{
|
||||
$this->model = new \app\common\model\OperationNotice();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
20
app/common/model/OperationNotice.php
Normal file
20
app/common/model/OperationNotice.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
use support\think\Model;
|
||||
|
||||
class OperationNotice extends Model
|
||||
{
|
||||
protected $name = 'operation_notice';
|
||||
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
protected $type = [
|
||||
'create_time' => 'integer',
|
||||
'update_time' => 'integer',
|
||||
'publish_at' => 'integer',
|
||||
'notice_type' => 'integer',
|
||||
'status' => 'integer',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user