Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
0cbaf49e
Commit
0cbaf49e
authored
Mar 15, 2016
by
Шакарим Сапа
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Добавлена модель на новую таблицу
parent
b05b0d5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
0 deletions
+64
-0
common/modules/triggers/models/TriggerLogs.php
common/modules/triggers/models/TriggerLogs.php
+64
-0
No files found.
common/modules/triggers/models/TriggerLogs.php
0 → 100644
View file @
0cbaf49e
<?php
namespace
app\models
;
use
Yii
;
use
common\modules\users\models\User
;
/**
* This is the model class for table "trigger_logs".
*
* @property integer $id
* @property integer $user_id
* @property string $action
* @property string $datetime
* @property integer $presence_time
*
* @property User $user
*/
class
TriggerLogs
extends
\yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public
static
function
tableName
()
{
return
'trigger_logs'
;
}
/**
* @inheritdoc
*/
public
function
rules
()
{
return
[
[[
'user_id'
,
'action'
,
'datetime'
],
'required'
],
[[
'user_id'
,
'presence_time'
],
'integer'
],
[[
'datetime'
],
'safe'
],
[[
'action'
],
'string'
,
'max'
=>
255
],
[[
'user_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
Users
::
className
(),
'targetAttribute'
=>
[
'user_id'
=>
'id'
]],
];
}
/**
* @inheritdoc
*/
public
function
attributeLabels
()
{
return
[
'id'
=>
'ID'
,
'user_id'
=>
'User ID'
,
'action'
=>
'Action'
,
'datetime'
=>
'Datetime'
,
'presence_time'
=>
'Presence Time'
,
];
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getUser
()
{
return
$this
->
hasOne
(
User
::
className
(),
[
'id'
=>
'user_id'
]);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment