<?php

class TemperatureReading extends DBObject implements JsonSerializable {

	public function __construct($id=0) {
		parent::__construct("temperature_log", "temperature_id", $id);
	}

	public function jsonSerialize() {
		$obj=new stdClass();
		$obj->Timestamp=(int)strtotime($this->Timestamp);
		$obj->Inside=(float)$this->Inside;
		$obj->Outside=(float)$this->Outside;
		return $obj;
	}

}
