<?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',
        ];
    }
}
