diff --git a/src/EventHub.Application.Contracts/Events/UpdateEventDto.cs b/src/EventHub.Application.Contracts/Events/UpdateEventDto.cs index 459816b..82aae30 100644 --- a/src/EventHub.Application.Contracts/Events/UpdateEventDto.cs +++ b/src/EventHub.Application.Contracts/Events/UpdateEventDto.cs @@ -16,6 +16,14 @@ namespace EventHub.Events [CanBeNull] public byte[] CoverImageContent { get; set; } + + [Required] + [DataType(DataType.DateTime)] + public DateTime StartTime { get; set; } + + [Required] + [DataType(DataType.DateTime)] + public DateTime EndTime { get; set; } public bool IsOnline { get; set; } diff --git a/src/EventHub.Application/Events/EventAppService.cs b/src/EventHub.Application/Events/EventAppService.cs index 09b439d..b267baa 100644 --- a/src/EventHub.Application/Events/EventAppService.cs +++ b/src/EventHub.Application/Events/EventAppService.cs @@ -248,7 +248,7 @@ namespace EventHub.Events @event.SetTitle(input.Title); @event.SetDescription(input.Description); @event.Language = input.Language; - + @event.SetTime(input.StartTime, input.EndTime); await _eventManager.SetCapacityAsync(@event, input.Capacity); if (input.CoverImageContent != null && input.CoverImageContent.Length > 0)