<?php

use App\SchemaMetadata;
use Illuminate\Database\Seeder;

class SchemaMetadataSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //
        $schema_metadata = new SchemaMetadata();
        $schema_metadata->module_name = 'supplier';
        $schema_metadata->create_api_object = '{
   "controls":[
      {
         "name":"name",
         "label":"Name",
         "value":null,
         "placeholder":"Enter Name",
         "type":"text",
         "emitChange":false,
         "readOnly":false,
         "validators":{
            "required":true
         },
         "minFractionDigits":2,
         "steps":1,
         "dateFormat":"dd/mm/yy",
         "errors":[

         ],
         "options":[

         ],
         "database":{
            "nullable":false,
            "defaultFieldAllowed":false,
            "defaultFieldValue":null,
            "type":"string",
            "enumValues":[

            ],
            "foreignKeyEnabled":false,
            "foreignKeyColumns":null,
            "foreignKeyTable":null
         }
      },
      {
         "name":"address",
         "label":"Address",
         "value":null,
         "placeholder":"Enter Address",
         "type":"textarea",
         "emitChange":false,
         "readOnly":false,
         "validators":{
            "required":true
         },
         "minFractionDigits":2,
         "steps":1,
         "dateFormat":"dd/mm/yy",
         "errors":[

         ],
         "options":[

         ],
         "database":{
            "nullable":true,
            "defaultFieldAllowed":false,
            "defaultFieldValue":null,
            "type":"string",
            "enumValues":[

            ],
            "foreignKeyEnabled":false,
            "foreignKeyColumns":null,
            "foreignKeyTable":null
         }
      },
      {
         "name":"email",
         "label":"Email",
         "value":null,
         "placeholder":"Enter Email",
         "type":"text",
         "emitChange":false,
         "readOnly":false,
         "validators":{
            "required":true,
            "email":true
         },
         "minFractionDigits":2,
         "steps":1,
         "dateFormat":"dd/mm/yy",
         "errors":[

         ],
         "options":[

         ],
         "database":{
            "nullable":false,
            "defaultFieldAllowed":false,
            "defaultFieldValue":null,
            "type":"string",
            "enumValues":[

            ],
            "foreignKeyEnabled":false,
            "foreignKeyColumns":null,
            "foreignKeyTable":null
         }
      },
      {
         "name":"mobileNo",
         "label":"Mobile Number",
         "value":null,
         "placeholder":"Enter Mobile Number",
         "type":"text",
         "emitChange":false,
         "readOnly":false,
         "validators":{
            "required":true,
            "maxValidation":true,
            "maxLength":10,
            "minValidation":true,
            "minLength":10
         },
         "minFractionDigits":2,
         "steps":1,
         "dateFormat":"dd/mm/yy",
         "errors":[

         ],
         "options":[

         ],
         "database":{
            "nullable":false,
            "defaultFieldAllowed":false,
            "defaultFieldValue":null,
            "type":"string",
            "enumValues":[

            ],
            "foreignKeyEnabled":false,
            "foreignKeyColumns":null,
            "foreignKeyTable":null
         }
      },
      {
         "name":"telephoneNo",
         "label":"Telephone Number",
         "value":null,
         "placeholder":"Enter Telephone Number",
         "type":"text",
         "emitChange":false,
         "readOnly":false,
         "validators":{
            "required":false,
            "maxValidation":true,
            "maxLength":12,
            "minValidation":true,
            "minLength":10
         },
         "minFractionDigits":2,
         "steps":1,
         "dateFormat":"dd/mm/yy",
         "errors":[

         ],
         "options":[

         ],
         "database":{
            "nullable":true,
            "defaultFieldAllowed":false,
            "defaultFieldValue":null,
            "type":"string",
            "enumValues":[

            ],
            "foreignKeyEnabled":false,
            "foreignKeyColumns":null,
            "foreignKeyTable":null
         }
      },
      {
         "name":"pocName",
         "label":"POC Name",
         "value":null,
         "placeholder":"Enter POC Name",
         "type":"text",
         "emitChange":false,
         "readOnly":false,
         "validators":{
            "required":true
         },
         "minFractionDigits":2,
         "steps":1,
         "dateFormat":"dd/mm/yy",
         "errors":[

         ],
         "options":[

         ],
         "database":{
            "nullable":false,
            "defaultFieldAllowed":false,
            "defaultFieldValue":null,
            "type":"string",
            "enumValues":[

            ],
            "foreignKeyEnabled":false,
            "foreignKeyColumns":null,
            "foreignKeyTable":null
         }
      },
      {
         "name":"description",
         "label":"Description",
         "value":null,
         "placeholder":"Enter Description",
         "type":"textarea",
         "emitChange":false,
         "readOnly":false,
         "validators":{
            "required":false
         },
         "minFractionDigits":2,
         "steps":1,
         "dateFormat":"dd/mm/yy",
         "errors":[

         ],
         "options":[

         ],
         "database":{
            "nullable":true,
            "defaultFieldAllowed":false,
            "defaultFieldValue":null,
            "type":"string",
            "enumValues":[

            ],
            "foreignKeyEnabled":false,
            "foreignKeyColumns":null,
            "foreignKeyTable":null
         }
      }
   ],
   "modelName":"Supplier"
}';
        $schema_metadata->create_api_link = 'admin/createSupplier';
        $schema_metadata->edit_api_object = '{}';
        $schema_metadata->edit_api_link = 'admin/updateSupplier';
        $schema_metadata->get_all_api_link = 'admin/getAllSuppliers';
        $schema_metadata->save();
    }
}
