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