83 lines
2.2 KiB
PHP
Executable File
83 lines
2.2 KiB
PHP
Executable File
<?php
|
||
|
||
declare(strict_types=1);
|
||
|
||
namespace App\Http\Controllers\Api\Nasa\V1;
|
||
use Illuminate\Http\Request;
|
||
use App\Http\Controllers\Api\Nasa\V1\Base\ListController;
|
||
|
||
final class FnTemplateController extends ListController
|
||
{
|
||
protected string $sModelPath = 'App\Models\ArticleTemplateFreenode';
|
||
protected array $aFilterFields = [ // 允许where的字段,不设视为全允许
|
||
// 's_name',
|
||
// 'i_status'
|
||
];
|
||
|
||
protected string $sPageName = "ArticleTemplateFreenode";
|
||
|
||
protected array $aListFields = [ // list展示的字段和名字映射
|
||
'id' => 'id',
|
||
'group_code' => 'group_code',
|
||
'title' => 'title',
|
||
'title_sub' => 'title_sub',
|
||
'content' => 'content',
|
||
'stauts' => 'stauts',
|
||
'created_at' => 'created_at',
|
||
'updated_at' => 'updated_at'
|
||
];
|
||
|
||
protected array $aValueStyle = [ // 特定文字渲染样式
|
||
// '关闭' => "<span class='text-danger'>关闭</span>",
|
||
// '开启' => "<span class='text-success'>开启</span>"
|
||
];
|
||
|
||
protected array $aFieldTypes = [
|
||
'content' => 'text',
|
||
// 'content_custom' => 'text',
|
||
// 'content_v2ray' => 'content_v2ray',
|
||
// 'content_clash' => 'content_clash'
|
||
];
|
||
|
||
protected array $aOrderBy = [
|
||
// [
|
||
// "sField" => "status",
|
||
// "sSort" => "desc",
|
||
// ],
|
||
[
|
||
"sField" => "id",
|
||
"sSort" => "desc",
|
||
]
|
||
];
|
||
|
||
protected array $aJsonFields = [ // json字段
|
||
|
||
];
|
||
|
||
protected array $aDateFields = [ // date字段
|
||
// 'dtUpdatedAt'
|
||
];
|
||
|
||
protected array $aLenthFields = [ // 限制长度的字段
|
||
// "xx" => 100,
|
||
];
|
||
|
||
protected array $aSelectFields = [ // 作为默认select的字段
|
||
// 'status',
|
||
];
|
||
|
||
protected array $aValueFields = [ // 值映射
|
||
// 'status' => [
|
||
// '1' => '开启',
|
||
// '0' => '关闭',
|
||
// ]
|
||
];
|
||
|
||
protected array $aCcExtFields = [
|
||
// 'dtCreatedAt' => '创建时间'
|
||
];
|
||
|
||
// protected array $aLimit = [3, 15, 40, 100]; // list长度,第一个为默认
|
||
|
||
}
|