<?php


namespace customerapi\models\details;


use common\models\Event;
use yii\base\Model;

/**
$property string $eventName;
$property string $start;
$property string $end;
$property string $seatCount;
$property string $reservationCount;
$property customerapi\models\details\EventDetailsView $room;
$property customerapi\models\details\TrainerDetailsView $trainer;
$property customerapi\models\details\EventTypeDetailsView $eventType;
$property string $registrations;
 */
class EventDetailsView extends Model // extends Event
{

    public $id;
    public $start;
    public $end;
    public $deleted_at;
    public $seatCount;
    // total count of registrations
    public $reservationCount;
    public $room;
    public $trainer;
    public $eventType;
    // registrations for current user
    public $registrations;

    public $hasFreeSeats;




    /**
     * @Override
     * @return array|false
     */
    function fields()
    {

        $fields = [
                    "id" => "id",
                    "start" => "start",
                    "end" => "end",
                    "seat_count" => "seatCount",
                    "deleted_at" =>"deleted_at",
                    "reservationCount" => "reservationCount",
                    "registrations" => "registrations",
                    "hasFreeSeats" => "hasFreeSeats"
        ];
        $fields['trainer'] = 'trainer';
        $fields['eventType'] = 'eventType';
        $fields['room'] = 'room';
        return $fields;
    }

}


