<?php

///////////////////////////////////////////////////////////////////////////////////////////////////
// Define each field of the current Entity - for each field you can set the following keys: ///////
// 'mandatory', 'invisible' and 'validation'. Use the '_special' field key code to allow adding ///
// extra validations that are not checked automatically. //////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////

// idCorporate
$CFG['globalEntity']['::CorporateCollection']['idCorporate']['mandatory']=true;
$CFG['globalEntity']['::CorporateCollection']['idCorporate']['invisible']=false;

// profile code
$CFG['globalEntity']['::CorporateCollection']['profileCode']['mandatory']=false;
$CFG['globalEntity']['::CorporateCollection']['profileCode']['invisible']=false;

// active
$CFG['globalEntity']['::CorporateCollection']['active']['mandatory']=false;
$CFG['globalEntity']['::CorporateCollection']['active']['invisible']=false;

// to
$CFG['globalEntity']['::CorporateCollection']['to']['mandatory']=false;
$CFG['globalEntity']['::CorporateCollection']['to']['invisible']=false;
$CFG['globalEntity']['::CorporateCollection']['to']['validation']=['maxLength'=>150];

// toAuto
$CFG['globalEntity']['::CorporateCollection']['toAuto']['mandatory']=false;
$CFG['globalEntity']['::CorporateCollection']['toAuto']['invisible']=false;
$CFG['globalEntity']['::CorporateCollection']['toAuto']['validation'] = [ 'list' => ['corporateEmail', 'corporateMainOfficeEmail', 'none'] ];

// bcc
$CFG['globalEntity']['::CorporateCollection']['bcc']['mandatory']=false;
$CFG['globalEntity']['::CorporateCollection']['bcc']['invisible']=false;
$CFG['globalEntity']['::CorporateCollection']['bcc']['validation']=['maxLength'=>150];


// due in days period
$CFG['globalEntity']['::CorporateCollection']['dueInDaysPeriod']['mandatory']=false;
$CFG['globalEntity']['::CorporateCollection']['dueInDaysPeriod']['invisible']=false;
$CFG['globalEntity']['::CorporateCollection']['dueInDaysPeriod']['validation']=['type'=>'int','minValue'=>0, 'maxValue'=>100];

// weekDays
$CFG['globalEntity']['::CorporateCollection']['weekDays']['mandatory']=false;
$CFG['globalEntity']['::CorporateCollection']['weekDays']['invisible']=false;

// monthDays
$CFG['globalEntity']['::CorporateCollection']['monthDays']['mandatory']=false;
$CFG['globalEntity']['::CorporateCollection']['monthDays']['invisible']=false;

// send time
$CFG['globalEntity']['::CorporateCollection']['sendTime']['mandatory']=false;
$CFG['globalEntity']['::CorporateCollection']['sendTime']['invisible']=false;
$CFG['globalEntity']['::CorporateCollection']['sendTime']['validation']=['type'=>'time'];
