using SharedLibraryCore.QueryHelper; using System; namespace Stats.Dtos { public class ChatSearchQuery : ClientPaginationRequest { /// /// specifies the partial content of the message to search for /// public string MessageContains { get; set; } /// /// identifier for the server /// public string ServerId { get; set; } /// /// identifier for the client /// public new int? ClientId { get; set; } /// /// only look for messages sent after this date /// public DateTime? SentAfter { get; set; } /// /// The time associated with SentAfter date /// public string SentAfterTime { get; set; } public DateTime? SentAfterDateTime => SentAfter?.Add(string.IsNullOrEmpty(SentAfterTime) ? TimeSpan.Zero : TimeSpan.Parse(SentAfterTime)); /// /// only look for messages sent before this date0 /// public DateTime SentBefore { get; set; } = DateTime.UtcNow.Date; public string SentBeforeTime { get; set; } public DateTime? SentBeforeDateTime => SentBefore.Add(string.IsNullOrEmpty(SentBeforeTime) ? TimeSpan.Zero : TimeSpan.Parse(SentBeforeTime)); public bool IsExactMatch { get; set; } /// /// indicates if the chat is on the meta page /// public bool IsProfileMeta { get; set; } } }