<?php
namespace Microservices\Config\Queries\ClientDB\Common;
use Microservices\App\Constants;
return [
'query' => "UPDATE `address` SET __SET__ WHERE __WHERE__",
'__CONFIG__' => [// [{payload/uriParams}, key/index, {Constants::$REQUIRED}]
['uriParams', 'id', Constants::$REQUIRED],
],
'__WHERE__' => [
'is_deleted' => ['custom', 'No'],
'id' => ['uriParams', 'id']
],
'validate' => [
[
'fn' => 'primaryKeyExist',
'fnArgs' => [
'table' => ['custom', 'address'],
'primary' => ['custom', 'id'],
'id' => ['uriParams', 'id']
],
'errorMessage' => 'Invalid address id'
],
]
];
|