PHP Classes

File: Config/Queries/ClientDB/POST/Registration.php

Recommend this page to a friend!
  Classes of Ramesh Narayan Jangid   Open Swoole Microservices   Config/Queries/ClientDB/POST/Registration.php   Download  
File: Config/Queries/ClientDB/POST/Registration.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: 18 days ago
Size: 1,201 bytes
 

Contents

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

use
Microservices\App\Constants;

return [
   
'query' => "INSERT INTO `registration` SET __SET__",
   
'__CONFIG__' => [// [{payload/uriParams}, key/index, {Constants::$REQUIRED}]
       
['payload', 'firstname', Constants::$REQUIRED],
        [
'payload', 'lastname', Constants::$REQUIRED],
        [
'payload', 'email', Constants::$REQUIRED]
    ],
   
'__SET__' => [
       
//column => [payload|readOnlySession|uriParams|insertIdParams|{custom}, key|{value}],
       
'firstname' => ['payload', 'firstname'],
       
'lastname' => ['payload', 'lastname'],
       
'email' => ['payload', 'email']
    ],
   
'insertId' => 'registration:id',
   
'subQuery' => [
       
'address' => [
           
'query' => "INSERT INTO `address` SET __SET__",
           
'__CONFIG__' => [// [{payload/uriParams}, key/index, {Constants::$REQUIRED}]
               
['payload', 'address', Constants::$REQUIRED]
            ],
           
'__SET__' => [
               
'registration_id' => ['insertIdParams', 'registration:id'],
               
'address' => ['payload', 'address']
            ],
           
'insertId' => 'address:id',
        ]
    ]
];