创建模型验证器,验证数据正确性
This commit is contained in:
@@ -31,6 +31,8 @@ class Channel extends Backend
|
||||
|
||||
protected string|array $quickSearchField = ['id', 'code', 'name'];
|
||||
|
||||
protected bool $modelSceneValidate = true;
|
||||
|
||||
private array $currentChannelIds = [];
|
||||
|
||||
protected function initController(WebmanRequest $request): ?Response
|
||||
|
||||
@@ -23,7 +23,9 @@ class CommissionRecord extends Backend
|
||||
|
||||
protected array $withJoinTable = ['settlementPeriod', 'channel', 'admin'];
|
||||
|
||||
protected bool $modelValidate = false;
|
||||
protected bool $modelValidate = true;
|
||||
|
||||
protected bool $modelSceneValidate = true;
|
||||
|
||||
protected function initController(WebmanRequest $request): ?Response
|
||||
{
|
||||
|
||||
@@ -21,7 +21,9 @@ class SettlementPeriod extends Backend
|
||||
|
||||
protected string|array $orderGuarantee = ['id' => 'desc'];
|
||||
|
||||
protected bool $modelValidate = false;
|
||||
protected bool $modelValidate = true;
|
||||
|
||||
protected bool $modelSceneValidate = true;
|
||||
|
||||
protected function initController(WebmanRequest $request): ?Response
|
||||
{
|
||||
|
||||
@@ -22,7 +22,9 @@ class GameConfig extends Backend
|
||||
|
||||
protected string|array $orderGuarantee = ['id' => 'asc'];
|
||||
|
||||
protected bool $modelValidate = false;
|
||||
protected bool $modelValidate = true;
|
||||
|
||||
protected bool $modelSceneValidate = true;
|
||||
|
||||
protected function initController(WebmanRequest $request): ?Response
|
||||
{
|
||||
|
||||
@@ -22,7 +22,9 @@ class Config extends Backend
|
||||
|
||||
protected string|array $orderGuarantee = ['id' => 'asc'];
|
||||
|
||||
protected bool $modelValidate = false;
|
||||
protected bool $modelValidate = true;
|
||||
|
||||
protected bool $modelSceneValidate = true;
|
||||
|
||||
protected function initController(WebmanRequest $request): ?Response
|
||||
{
|
||||
|
||||
@@ -23,7 +23,9 @@ class Period extends Backend
|
||||
|
||||
protected string|array $orderGuarantee = ['id' => 'desc'];
|
||||
|
||||
protected bool $modelValidate = false;
|
||||
protected bool $modelValidate = true;
|
||||
|
||||
protected bool $modelSceneValidate = true;
|
||||
|
||||
protected function initController(WebmanRequest $request): ?Response
|
||||
{
|
||||
|
||||
@@ -21,7 +21,9 @@ class OperationNotice extends Backend
|
||||
|
||||
protected string|array $orderGuarantee = ['id' => 'desc'];
|
||||
|
||||
protected bool $modelValidate = false;
|
||||
protected bool $modelValidate = true;
|
||||
|
||||
protected bool $modelSceneValidate = true;
|
||||
|
||||
protected function initController(WebmanRequest $request): ?Response
|
||||
{
|
||||
|
||||
@@ -23,7 +23,9 @@ class UserNoticeRead extends Backend
|
||||
|
||||
protected array $withJoinTable = ['user', 'operationNotice'];
|
||||
|
||||
protected bool $modelValidate = false;
|
||||
protected bool $modelValidate = true;
|
||||
|
||||
protected bool $modelSceneValidate = true;
|
||||
|
||||
protected function initController(WebmanRequest $request): ?Response
|
||||
{
|
||||
|
||||
@@ -14,7 +14,9 @@ class DepositOrder extends Backend
|
||||
{
|
||||
protected ?object $model = null;
|
||||
|
||||
protected bool $modelValidate = false;
|
||||
protected bool $modelValidate = true;
|
||||
|
||||
protected bool $modelSceneValidate = true;
|
||||
|
||||
protected string|array $quickSearchField = ['id', 'order_no', 'pay_channel', 'remark'];
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@ class WithdrawOrder extends Backend
|
||||
{
|
||||
protected ?object $model = null;
|
||||
|
||||
protected bool $modelValidate = false;
|
||||
protected bool $modelValidate = true;
|
||||
|
||||
protected bool $modelSceneValidate = true;
|
||||
|
||||
protected string|array $quickSearchField = ['id', 'order_no', 'remark'];
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ class User extends Backend
|
||||
|
||||
protected string|array $quickSearchField = ['id', 'username', 'phone'];
|
||||
|
||||
protected bool $modelSceneValidate = true;
|
||||
|
||||
protected function initController(WebmanRequest $request): ?Response
|
||||
{
|
||||
$this->model = new \app\common\model\User();
|
||||
|
||||
Reference in New Issue
Block a user