<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/10/13
 * Time: 11:48
 */
class LiveRecordInfo
{
    public $id = 0;
    public $liveId = 0;
    public $name = "";
    public $startTime = "00:00:00";
    public $endTime = "23:59:59";
    public $daysOfWeek = "1,2,3,4,5,6,7";
    public $recordStatus = false;
    public $recordName = "";

    public function toJson()
    {
        return json_encode($this);
    }

    public function fromJson($json_obj)
    {
        $this->id = $json_obj['id'];
        $this->liveId = $json_obj['liveId'];
        $this->name = $json_obj['name'];
        $this->startTime = $json_obj['startTime'];
        $this->endTime = $json_obj['endTime'];
        $this->daysOfWeek = $json_obj['daysOfWeek'];
    }
}