<?php

namespace customerapi\models\dto;

use yii\base\Model;

class RoomDTO extends Model
{


    public $id;
    public $name;
    public $seat_count;
    public $created_at;
    public $updated_at;

    public static function fromRoom($room)
    {
        $dto = new RoomDTO();
        $dto->id = $room->id;
        $dto->name = $room->name;
        $dto->seat_count = $room->seat_count;
        $dto->created_at = $room->created_at;
        $dto->updated_at = $room->updated_at;
        return $dto;
    }
}
