You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
902 B
45 lines
902 B
<?php
|
|
|
|
namespace common\models;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "user_power_t".
|
|
*
|
|
* @property integer $user_id
|
|
* @property integer $power_id
|
|
*/
|
|
class UserPowerT extends \common\models\Base
|
|
{
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return 'user_power_t';
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['user_id', 'power_id'], 'required'],
|
|
[['user_id', 'power_id'], 'integer'],
|
|
[['user_id', 'power_id'], 'unique', 'targetAttribute' => ['user_id', 'power_id'], 'message' => 'The combination of User ID and Power ID has already been taken.'],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'user_id' => 'User ID',
|
|
'power_id' => 'Power ID',
|
|
];
|
|
}
|
|
}
|
|
|