<?php
namespace app\modules\hub\models\api;

use yii\base\Model;

class Session extends Model {

    public $session_id = null;
    public $domain = null;
    public $peer_id = null;

    public function __construct($scenario){
        $this->setScenario($scenario);
    }
    
    public function rules(){
        return [
            [['domain'], 'required', 'on' => 'progress'],
            [['session_id'], 'required', 'on' => 'peers'],
            [['peer_id', 'domain'], 'required', 'on' => 'start'],
        ];
    }
}