view Agendas/trunk/src/Agendas.Domain/Track.cs @ 116:53bcd338542b

acciones de confirmar y publicar desde la UI
author Nelo@Kenia.neluz.int
date Sun, 19 Jun 2011 13:00:02 -0300
parents 90ce239cfa6d
children 6f1041301797
line wrap: on
line source

using System;
using System.Collections.Generic;

namespace AltNetHispano.Agendas.Domain
{
	public class Track : Identificable
	{
		private readonly IList<TrackLog> _logs;

		protected Track()
		{
			//ctor para NHibernate
			_logs = new List<TrackLog>();
		}

		public Track(Evento evento, Accion accion)
			: this()
		{
			Usuario = IdentityContext.GetUsuario();
			Evento = evento;
			Accion = accion;
		}

		public virtual Evento Evento { get; private set; }
		public virtual Accion Accion { get; private set; }
		public virtual Persona Usuario { get; private set; }

		public virtual IEnumerable<TrackLog> Logs
		{
			get { return _logs; }
		}

		public virtual void LogAdd(TrackLog trackLog)
		{
			trackLog.Track = this;
			_logs.Add(trackLog);
		}
	}

	public enum Accion
	{
		Proponer = 1,
		Agendar = 2,
		Modificar = 3,
		CambiarTitulo = 4,
		Publicar = 5,
		Confirmar = 6
	}

}