<?php

namespace PortalPeople\oauth2\models;

use Yii;

/**
 * This is the model class for table "oauth_clients".
 *
 * @property string $client_id
 * @property string|null $client_secret
 * @property string $redirect_uri
 * @property string $grant_types
 * @property string|null $scope
 * @property int|null $user_id
 *
 * @property OauthAccessTokens[] $oauthAccessTokens
 * @property OauthAuthorizationCodes[] $oauthAuthorizationCodes
 * @property OauthRefreshTokens[] $oauthRefreshTokens
 */
class OauthScope extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'oauth_scopes';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['scope'], 'string', 'max' => 50],
            [['scope'], 'unique'],
            [['is_default'], 'boolean'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'scope' => 'Scope',
            'is_default' => 'Is Default',
        ];
    }

}
