SysUserProfile.php
938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace common\models;
use yii\db\ActiveRecord;
use yii\behaviors\TimestampBehavior;
use domain\DBHelper;
/**
* 系统用户附表
* This is the model class for table "{{%sys_user_profile}}".
*/
class SysUserProfile extends ActiveRecord
{
/**
* 获取带数据库前缀的表名
* @return string
*/
public static function tableNameWithDbPrefix()
{
$dbName = DBHelper::getDbName(self::getDb());
return $dbName . '.sys_user_profile';
}
/**
* @inheritdoc
*/
public static function tableName()
{
return '{{%sys_user_profile}}';
}
/**
* @return array
*/
public function behaviors()
{
return [
'time' => [
'class' => TimestampBehavior::className(),
'createdAtAttribute' => 'created_at',
'updatedAtAttribute' => 'updated_at',
]
];
}
}