<?php
namespace Microservices\Config\Queries\ClientDB\Common;
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'
],
]
];
|