<?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. //////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////

// lastName
$CFG['globalEntity']['::User']['lastName']['mandatory']=true;
$CFG['globalEntity']['::User']['lastName']['invisible']=false;
$CFG['globalEntity']['::User']['lastName']['validation'] = [ 'maxLength'=>50 ];
// firstName
$CFG['globalEntity']['::User']['firstName']['mandatory']=true;
$CFG['globalEntity']['::User']['firstName']['invisible']=false;
$CFG['globalEntity']['::User']['firstName']['validation'] = [ 'maxLength'=>50 ];
// username
$CFG['globalEntity']['::User']['username']['mandatory']=true;
$CFG['globalEntity']['::User']['username']['invisible']=false;
$CFG['globalEntity']['::User']['username']['validation'] = [ 'type'=>'username', 'minLength'=>3, 'maxLength'=>50 ];
// password (manually set for inserting)
$CFG['globalEntity']['::User']['password']['mandatory']=false;
$CFG['globalEntity']['::User']['password']['invisible']=false;
$CFG['globalEntity']['::User']['password']['validation'] = [ 'type'=>'string', 'minLength'=>6, 'maxLength'=>300 ];
// language
$CFG['globalEntity']['::User']['language']['mandatory']=true;
$CFG['globalEntity']['::User']['language']['invisible']=true;
$CFG['globalEntity']['::User']['language']['validation'] = [ 'list'=> array_keys($CFG['languages']['availableLanguages']) ];
// title
$CFG['globalEntity']['::User']['title']['mandatory']=false;
$CFG['globalEntity']['::User']['title']['invisible']=false;
$CFG['globalEntity']['::User']['title']['validation'] = [ 'list' => $CFG['generalData']['personTitles'] ];
// office
$CFG['globalEntity']['::User']['idOffice']['mandatory']=true;
$CFG['globalEntity']['::User']['idOffice']['invisible']=false;
$CFG['globalEntity']['::User']['idOffice']['validation'] = [ 'type'=>'int', 'minValue'=>1 ];
// department
$CFG['globalEntity']['::User']['idDepartment']['mandatory']=true;
$CFG['globalEntity']['::User']['idDepartment']['invisible']=false;
$CFG['globalEntity']['::User']['idDepartment']['validation'] = [ 'type'=>'int', 'minValue'=>1 ];
// birthday
$CFG['globalEntity']['::User']['birthday']['mandatory']=false;
$CFG['globalEntity']['::User']['birthday']['invisible']=false;
$CFG['globalEntity']['::User']['birthday']['validation'] = [ 'type'=>'date', 'minValue'=>'1900-01-01', 'maxValue'=>TODAY_ISO ];
// ID_series
$CFG['globalEntity']['::User']['ID_series']['mandatory']=false;
$CFG['globalEntity']['::User']['ID_series']['invisible']=false;
$CFG['globalEntity']['::User']['ID_series']['validation'] = ['maxLength'=>30];
// ID_number
$CFG['globalEntity']['::User']['ID_number']['mandatory']=false;
$CFG['globalEntity']['::User']['ID_number']['invisible']=false;
$CFG['globalEntity']['::User']['ID_number']['validation'] = ['maxLength'=>50];
// ID releaseBy
$CFG['globalEntity']['::User']['ID_releaseBy']['mandatory']=false;
$CFG['globalEntity']['::User']['ID_releaseBy']['invisible']=false;
$CFG['globalEntity']['::User']['ID_releaseBy']['validation'] = ['maxLength'=>100];
// ID_releaseDate
$CFG['globalEntity']['::User']['ID_releaseDate']['mandatory']=false;
$CFG['globalEntity']['::User']['ID_releaseDate']['invisible']=false;
$CFG['globalEntity']['::User']['ID_releaseDate']['validation'] = [ 'type'=>'date', 'minValue'=>'1900-01-01', 'maxValue'=>TODAY_ISO];
// PNC
$CFG['globalEntity']['::User']['PNC']['mandatory']=false;
$CFG['globalEntity']['::User']['PNC']['invisible']=false;
$CFG['globalEntity']['::User']['PNC']['validation'] = ['maxLength'=>50];
// address
$CFG['globalEntity']['::User']['address']['mandatory']=false;
$CFG['globalEntity']['::User']['address']['invisible']=false;
$CFG['globalEntity']['::User']['address']['validation'] = [ 'maxLength'=>250 ];
// job
$CFG['globalEntity']['::User']['job']['mandatory']=false;
$CFG['globalEntity']['::User']['job']['invisible']=false;
$CFG['globalEntity']['::User']['job']['validation'] = [ 'maxLength'=>50 ];
// email
$CFG['globalEntity']['::User']['email']['mandatory']=false;
$CFG['globalEntity']['::User']['email']['invisible']=false;
$CFG['globalEntity']['::User']['email']['validation'] = [ 'type'=>'email', 'maxLength'=>'50'];
// telephone
$CFG['globalEntity']['::User']['telephone']['mandatory']=false;
$CFG['globalEntity']['::User']['telephone']['invisible']=false;
$CFG['globalEntity']['::User']['telephone']['validation'] = [ 'maxLength'=>'50' ];
// comments
$CFG['globalEntity']['::User']['comments']['mandatory']=false;
$CFG['globalEntity']['::User']['comments']['invisible']=false;
// remarks
$CFG['globalEntity']['::User']['remarks']['mandatory']=false;
$CFG['globalEntity']['::User']['remarks']['invisible']=false;
// users access profile
$CFG['globalEntity']['::User']['idUsersAccessProfile']['mandatory']=false;
$CFG['globalEntity']['::User']['idUsersAccessProfile']['invisible']=false;
$CFG['globalEntity']['::User']['idUsersAccessProfile']['validation'] = [ 'type'=>'int', 'minValue'=>0 ];
// cantLoginUntil
$CFG['globalEntity']['::User']['cantLoginUntil']['mandatory']=false;
$CFG['globalEntity']['::User']['cantLoginUntil']['invisible']=false;


