PHP Classes

File: Config/Queries/GlobalDB/POST/groups.php

Recommend this page to a friend!
  Classes of Ramesh Narayan Jangid   Open Swoole Microservices   Config/Queries/GlobalDB/POST/groups.php   Download  
File: Config/Queries/GlobalDB/POST/groups.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: Open Swoole Microservices
Implement microservices using Open Swoole
Author: By
Last change: Implemented serverMode feature for Read Configs
Date: 1 month ago
Size: 1,082 bytes
 

Contents

Class file image Download
<?php
namespace Microservices\Config\Queries\GlobalDB\POST;

use
Microservices\App\Constants;

return [
   
'query' => "INSERT INTO `{$Env::$groups}` SET __SET__",
   
'__CONFIG__' => [// [{payload/uriParams}, key/index, {Constants::$REQUIRED}]
       
['payload', 'name', Constants::$REQUIRED],
        [
'payload', 'client_id'],
        [
'payload', 'connection_id'],
        [
'payload', 'allowed_ips'],
        [
'payload', 'comments'],
    ],
   
'__SET__' => [
       
//column => [payload|readOnlySession|uriParams|insertIdParams|{custom}, key|{value}],
       
'name' => ['payload', 'name'],
       
'client_id' => ['payload', 'client_id'],
       
'connection_id' => ['payload', 'connection_id'],
       
'allowed_ips' => ['payload', 'allowed_ips'],
       
'comments' => ['payload', 'comments'],
       
'created_by' => ['readOnlySession', 'user_id'],
       
'created_on' => ['custom', date('Y-m-d H:i:s')],
       
'is_approved' => ['custom', 'No'],
       
'is_disabled' => ['custom', 'No'],
       
'is_deleted' => ['custom', 'No']
    ],
   
'insertId' => 'group_id',
];