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
891 B
45 lines
891 B
<?php
|
|
|
|
namespace common\models;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "user_menu_t".
|
|
*
|
|
* @property integer $user_id
|
|
* @property integer $menu_id
|
|
*/
|
|
class UserMenuT extends \common\models\Base
|
|
{
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return 'user_menu_t';
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['user_id', 'menu_id'], 'required'],
|
|
[['user_id', 'menu_id'], 'integer'],
|
|
[['user_id', 'menu_id'], 'unique', 'targetAttribute' => ['user_id', 'menu_id'], 'message' => 'The combination of User ID and Menu ID has already been taken.'],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'user_id' => 'User ID',
|
|
'menu_id' => 'Menu ID',
|
|
];
|
|
}
|
|
}
|
|
|