From 5393cdea9058dfa3dc8d23f6d0553fe98ee232b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sun, 18 Jul 2021 11:31:35 +0300 Subject: [PATCH] Added IsDraft and revised setting the time. --- src/EventHub.Domain/Events/Event.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/EventHub.Domain/Events/Event.cs b/src/EventHub.Domain/Events/Event.cs index 6011a69..9c9314f 100644 --- a/src/EventHub.Domain/Events/Event.cs +++ b/src/EventHub.Domain/Events/Event.cs @@ -44,6 +44,8 @@ namespace EventHub.Events public bool IsTimingChangeEmailSent { get; set; } + public bool IsDraft { get; set; } + public ICollection Tracks { get; private set; } private Event() @@ -97,9 +99,10 @@ namespace EventHub.Events .WithData("MaxTimingChangeLimit", EventConsts.MaxTimingChangeCountForUser); } + SetTimeInternal(startTime, endTime); + TimingChangeCount++; AddLocalEvent(new EventTimeChangingEventData(this, StartTime, EndTime)); - - return SetTimeInternal(startTime, endTime); + return this; } private Event SetTimeInternal(DateTime startTime, DateTime endTime) @@ -111,7 +114,6 @@ namespace EventHub.Events StartTime = startTime; EndTime = endTime; - TimingChangeCount++; return this; } }