Commit realizando cambios en los roles de los usuarios

This commit is contained in:
Jaime Jimenez
2023-04-24 13:00:46 +02:00
parent 2d67588770
commit 8c4d77a598
6587 changed files with 365497 additions and 0 deletions

0
ci4/app/Models/.gitkeep Normal file
View File

View File

@ -0,0 +1,20 @@
<?php
namespace App\Models;
class ActivityModel extends BaseModel
{
protected $table = 'auth_activity';
protected $primaryKey = 'id_activity';
protected $allowedFields = [
'user',
'level',
'event',
'ip',
'os',
'browser',
'detail'
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Models;
class BackupModel extends BaseModel
{
protected $table = 'auth_backup';
protected $primaryKey = 'id_backup';
protected $allowedFields = [
'path',
'error'
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}

View File

@ -0,0 +1,16 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class BaseModel extends Model
{
protected $afterFind = [
'escapeXSS'
];
protected function escapeXSS($data)
{
return esc($data);
}
}

View File

@ -0,0 +1,17 @@
<?php
namespace App\Models;
class ConfirmationTokenModel extends BaseModel
{
protected $table = 'auth_confirmation_token';
protected $primaryKey = 'id_confirmation';
protected $allowedFields = [
'user',
'token',
'confirmed',
'type'
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\Models;
class CountriesModel extends BaseModel
{
protected $table = 'auth_countries';
protected $primaryKey = 'id_country';
protected $allowedFields = [
'phone',
'code',
'name',
'symbol',
'capital',
'currency',
'continent',
'continent_code',
'alpha_3',
'data_lang'
];
}

View File

@ -0,0 +1,15 @@
<?php
namespace App\Models;
class CronTabModel extends BaseModel
{
protected $table = 'auth_crontab_history';
protected $primaryKey = 'id_crontab';
protected $allowedFields = [
'routine',
'error'
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}

View File

@ -0,0 +1,13 @@
<?php
namespace App\Models;
class CurrencyModel extends BaseModel
{
protected $table = 'auth_currency';
protected $primaryKey = 'id_currency';
protected $allowedFields = [
'code',
'name',
'data_lang'
];
}

View File

@ -0,0 +1,11 @@
<?php
namespace App\Models;
class GroupUserModel extends BaseModel
{
protected $table = 'group_user';
protected $allowedFields = [
'token_user',
'token_group'
];
}

View File

@ -0,0 +1,21 @@
<?php
namespace App\Models;
class NotificationModel extends BaseModel
{
protected $table = 'auth_notification';
protected $primaryKey = 'id_notification';
protected $allowedFields = [
'user_sender',
'user_recipient',
'title',
'body',
'is_read',
'is_send_email',
'send_email_notification',
'token'
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}

View File

@ -0,0 +1,17 @@
<?php
namespace App\Models;
class PasswordRecoveryModel extends BaseModel
{
protected $table = 'auth_password_recovery';
protected $primaryKey = 'id_pass_recovery';
protected $allowedFields = [
'user',
'token',
'changed'
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}

View File

@ -0,0 +1,82 @@
<?php
namespace App\Models;
class SettingsModel extends BaseModel
{
protected $table = 'auth_settings';
protected $primaryKey = 'id_settings';
protected $allowedFields = [
'title',
'activate_frontend',
'logo',
'icon',
'default_language',
'default_role',
'default_date_format',
'default_hour_format',
'default_currency',
'default_currency_position',
'default_currency_separation',
'default_country',
'default_theme',
'default_theme_front',
'default_timezone',
'seo_description',
'seo_keywords',
'email_gateway',
'email_name',
'email_address',
'email_smtp',
'email_port',
'email_pass',
'email_cert',
'email_account_id',
'email_auth_token',
'email_info_add',
'captcha_gateway',
'captcha_site_key',
'captcha_secret_key',
'captcha_register',
'captcha_login',
'captcha_recovery',
'registration',
'terms_conditions',
'terms_conditions_text',
'email_confirmation',
'send_user_register',
'send_email_register',
'send_notification_register',
'send_email_welcome',
'remember_me',
'forgot_password',
'two_factor_auth',
'throttle_auth',
'throttle_auth_max_attempts',
'throttle_auth_lockour_time',
'jwt_token_lifetime',
'jwt_private_key',
'group_api',
'block_external_api',
'ip_allowed_api',
'enable_api',
'remove_log',
'remove_log_time',
'remove_log_latest',
'storage_gateway',
'aws_endpoint',
'aws_key',
'aws_secret',
'aws_region',
'aws_bucket',
'backup_storage',
'backup_table',
'backup_email',
'backup_notification_email',
'backup_automatic',
'backup_time',
'backup_latest',
'purchase_code'
];
protected $useTimestamps = true;
protected $updatedField = 'updated_at';
}

View File

@ -0,0 +1,16 @@
<?php
namespace App\Models;
class TemplateModel extends BaseModel
{
protected $table = 'auth_template';
protected $primaryKey = 'id_template';
protected $allowedFields = [
'name',
'subject',
'body',
'type'
];
protected $useTimestamps = true;
protected $updatedField = 'updated_at';
}

View File

@ -0,0 +1,13 @@
<?php
namespace App\Models;
class ThemeModel extends BaseModel
{
protected $table = 'auth_theme';
protected $primaryKey = 'id_theme';
protected $allowedFields = [
'name',
'type',
'path'
];
}

View File

@ -0,0 +1,12 @@
<?php
namespace App\Models;
class TimezoneModel extends BaseModel
{
protected $table = 'auth_timezone';
protected $primaryKey = 'id_timezone';
protected $allowedFields = [
'timezone',
'description'
];
}

View File

@ -0,0 +1,17 @@
<?php
namespace App\Models;
class UserGroupModel extends BaseModel
{
protected $table = 'auth_user_group';
protected $primaryKey = 'id_group';
protected $allowedFields = [
'title',
'dashboard',
'rules',
'token'
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}

View File

@ -0,0 +1,36 @@
<?php
namespace App\Models;
class UserModel extends BaseModel
{
protected $table = 'auth_user';
protected $primaryKey = 'id_user';
protected $allowedFields = [
'group',
'first_name',
'last_name',
'date_birth',
'address',
'city',
'state',
'country',
'zip_code',
'mobile',
'email',
'password',
'last_ip',
'last_access',
'picture',
'language',
'tfa',
'tfa_secret',
'tfa_code',
'blocked',
'email_confirmed',
'token',
'status'
];
protected $useTimestamps = true;
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
}