//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Collections;

namespace CommunityServer.Components {

	public class UrlRedirect : IComparable
	{
		public int ID
		{
			get{ return _id; }
			set{ _id = value; }
		}

		public string Url
		{
			get{ return _url; }
			set{ _url = value; }
		}

		public string Description
		{
			get{ return _description; }
			set{ _description = value; }
		}

		public int Impressions
		{
			get{ return _impressions; }
			set{ _impressions = value; }
		}

		public string Base36ID
		{
			get { return CommunityServer.Components.HttpHandler.Base36.NumberToBase36(ID); }
		}

		public string TinyUrl
		{
			get { return Globals.FullPath(Globals.GetSiteUrls().Home) + "r.ashx?" + Base36ID; }
		}

		public UrlRedirect()
		{
		}

		public UrlRedirect(int id, string url, string description, int impressions)
		{
			_id				= id;
			_url			= url;
			_description	= description;
			_impressions	= impressions;
		}

		private int _id;
		private string _url;
		private string _description;
		private int _impressions;

		public int CompareTo(object obj)
		{
			return 0;
		}
	}
}