2013-07-19 06:47:55 +03:00
|
|
|
using NzbDrone.Common.Messaging;
|
2013-05-06 00:24:33 +03:00
|
|
|
|
|
|
|
namespace NzbDrone.Core.Datastore.Events
|
|
|
|
{
|
2013-09-11 09:33:47 +03:00
|
|
|
public class ModelEvent <TModel> : IEvent
|
2013-05-06 00:24:33 +03:00
|
|
|
{
|
2013-09-11 09:33:47 +03:00
|
|
|
public TModel Model { get; set; }
|
|
|
|
public ModelAction Action { get; set; }
|
2013-05-06 00:24:33 +03:00
|
|
|
|
2013-09-11 09:33:47 +03:00
|
|
|
public ModelEvent(TModel model, ModelAction action)
|
2013-05-06 00:24:33 +03:00
|
|
|
{
|
|
|
|
Model = model;
|
|
|
|
Action = action;
|
|
|
|
}
|
2013-05-21 07:10:04 +03:00
|
|
|
}
|
2013-05-06 00:24:33 +03:00
|
|
|
|
2013-09-11 09:33:47 +03:00
|
|
|
public enum ModelAction
|
2013-05-21 07:10:04 +03:00
|
|
|
{
|
2013-09-11 09:33:47 +03:00
|
|
|
Unknow = 0,
|
2013-05-21 07:10:04 +03:00
|
|
|
Created = 1,
|
|
|
|
Updated = 2,
|
2013-09-11 09:33:47 +03:00
|
|
|
Deleted = 3,
|
|
|
|
Sync = 4
|
2013-05-06 00:24:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|