| Current Path : /var/www/html/dosm/backend/models/ |
| Current File : /var/www/html/dosm/backend/models/AuditTrailEntry.php |
<?php
namespace backend\models;
use Yii;
/**
* This is the model class for table "audit_trail_entry".
*
* @property int $id
* @property string $model_type
* @property int $happened_at
* @property string $foreign_pk
* @property int|null $user_id
* @property string $type
* @property string|null $data
*/
class AuditTrailEntry extends \yii\db\ActiveRecord {
/**
* {@inheritdoc}
*/
public static function tableName() {
return 'audit_trail_entry';
}
/**
* {@inheritdoc}
*/
public function rules() {
return [
[['model_type', 'happened_at', 'foreign_pk', 'type'], 'required'],
[['happened_at', 'user_id'], 'integer'],
[['data'], 'string'],
[['model_type', 'foreign_pk', 'type'], 'string', 'max' => 255],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels() {
return [
'id' => Yii::t('app', 'ID'),
'model_type' => Yii::t('app', 'Modules Name'),
'happened_at' => Yii::t('app', 'Action Date & Time'),
'foreign_pk' => Yii::t('app', 'Data ID'),
'user_id' => Yii::t('app', 'User ID'),
'type' => Yii::t('app', 'Action Type'),
'data' => Yii::t('app', 'Data'),
];
}
public function getUser() {
return $this->hasOne(\backend\models\User::className(), ['id' => 'user_id']);
}
public static function modulesList() {
$arr = [
'backend\modules\mimin\models\User' => 'Backend > User',
'backend\modules\mimin\models\AuthItem' => 'Backend > Role',
'backend\modules\mimin\models\Route' => 'Backend > Route',
'backend\modules\menu\models\backend\Menu' => 'Backend > Menu',
'backend\modules\theme\models\ThemeSetting' => 'Backend > Theme',
'backend\modules\customDashboard\models\DataDashboard' => 'Backend > Dashboard',
'backend\modules\support\models\SupportTutorial' => 'Backend > Tutorial',
'backend\modules\support\models\SupportFaq' => 'Backend > FAQ',
'backend\modules\refdynawebv2\models\Ref' => 'Backend > Parameter',
'backend\modules\api\models\Api' => 'Backend > API',
'backend\models\frontend\FrontendSite' => 'Frontend > Sites',
'backend\models\frontendcontent\FrontendContent' => 'Frontend > Content',
'backend\models\frontendheader\FrontendHeader' => 'Frontend > Header',
'backend\models\frontendfooter\FrontendFooter' => 'Frontend > Footer',
'backend\models\frontendtheme\FrontendTheme' => 'Frontend > Theme',
'backend\modules\menu\models\frontend\Menu' => 'Frontend > Menu',
'backend\modules\fruserdynav2\models\FrontendUser' => 'Frontend > User',
'backend\modules\uiuxBuilder\models\UiuxTemplates' => 'UI/UX > Elements',
'backend\modules\chat\models\ChatAnswerBot' => 'Chatbot > Bot Training',
'backend\modules\chat\models\ChatSuggestion' => 'Chatbot > Bot Suggestion',
'backend\modules\chat\models\ChatUser' => 'Chatbot > Chat Users',
'backend\modules\chat\models\ChatQuestion' => 'Chatbot > User Question',
'backend\modules\studentCorner\models\StudentCorner' => 'DOSM Apps > Student Corner',
'backend\models\LifeExpectancyRange' => 'DOSM Apps > Life Expectancy (Age Range)',
'backend\models\LifeExpectancyRange' => 'DOSM Apps > Life Expectancy (Age Range)',
'backend\models\LifeExpectancyGender' => 'DOSM Apps > Life Expectancy (Gender)',
'backend\models\LifeExpectancyEthnic' => 'DOSM Apps > Life Expectancy (Ethnic)',
'backend\modules\glossary\models\Glossary' => 'DOSM Apps > Glossary',
'backend\modules\contentAnnouncement\models\ContentAnnouncement' => 'Content > Announcement',
'backend\modules\contentArticle\models\ContentArticle' => 'Content > Articles',
'backend\modules\contentApplication\models\ContentApplication' => 'Content > Links',
'backend\modules\contentCalendar\models\ContentCalendar' => 'Content > Calendar',
'backend\modules\contentMediaStatement\models\ContentMediaStatement' => 'Content > Media Statement',
'backend\modules\contentNewspaper\models\ContentNewspaper' => 'Content > Newspaper Clippings',
'backend\modules\contentPhoto\models\ContentPhotoGallery' => 'Content > Photo Gallery',
'backend\modules\contentPoll\models\ContentPoll' => 'Content > Poll',
'backend\modules\publicationDocument\models\PublicationDocument' => 'Content > Publications',
'backend\modules\holiday\models\Holiday' => 'Content > Public Holiday',
'backend\modules\contentSlider\models\ContentSlider' => 'Content > Slider Images',
'backend\modules\contentSlider\models\ContentSliderBackground' => 'Content > Slider Background',
'backend\modules\contentStatistics\models\ContentStatistics' => 'Content > Statistics',
'backend\modules\contentDirectory\models\ContentDirectory' => 'Content > Staff Directory',
'backend\modules\contentSocialMedia\models\ContentSocialMedia' => 'Content > Social Media',
'backend\modules\contentVideo\models\ContentVideo' => 'Content > Video',
'backend\modules\contentDownloads\models\ContentDownloads' => 'Content > Downloads',
'backend\models\i18n\DmgI18nSourceMessage' => 'Content > Translation',
'backend\modules\populationClock\models\PopulationClockData' => 'Applications > Population Clock Data',
'backend\modules\populationClock\models\PopulationClockData' => 'Applications > Population Clock Data',
'backend\modules\populationClock\models\PopulationClockScript' => 'Applications > Population Clock Scripts',
'backend\modules\releaseThemes\models\ReleaseThemes' => 'Stats Release > Themes',
'backend\modules\releaseSettings\models\ReleaseSettings' => 'Stats Release > Releases',
'backend\modules\releaseContent\models\ReleaseContent' => 'Stats Release > Release Contents',
'backend\modules\tableBuilder\models\TableBuilder' => 'Stats Release > Release Contents > Table / Graph',
'backend\models\AuditTrailEntry'=>'Login / Logout',
];
return $arr;
}
}