﻿using System;
using System.Collections.Generic;

using Newtonsoft.Json;

namespace TeenTix.Common.Model
{
	public class EventListResponse
	{
		[JsonProperty("message")]
		public string Message { get; set; }
		[JsonProperty("success")]
		public bool Success { get; set; }
		[JsonProperty("data")]
		public Dictionary<string, Event> Events { get; set; }

		public EventListResponse ()
		{
		}

		public override string ToString ()
		{
			// FIXME: move this to StringUtil. (thomasvandoren, 2016-04-20)
			var eventsStr = "{";
			foreach (KeyValuePair<string, Event> keyValue in Events) {
				eventsStr += string.Format ("{0}={1}, ", keyValue.Key, keyValue.Value);
			}
			eventsStr += "}";
			return string.Format ("[EventListResponse: Message={0}, Success={1}, Events={2}]", Message, Success, eventsStr);
		}
	}
}

