2020-08-20 11:38:11 -04:00
|
|
|
|
using SharedLibraryCore.QueryHelper;
|
2020-05-22 21:29:41 -04:00
|
|
|
|
using System;
|
|
|
|
|
|
2020-08-20 11:38:11 -04:00
|
|
|
|
namespace Stats.Dtos
|
2020-05-22 21:29:41 -04:00
|
|
|
|
{
|
2020-08-17 22:21:11 -04:00
|
|
|
|
public class ChatSearchQuery : ClientPaginationRequest
|
2020-05-22 21:29:41 -04:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// specifies the partial content of the message to search for
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string MessageContains { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// identifier for the server
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string ServerId { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// identifier for the client
|
|
|
|
|
/// </summary>
|
2020-08-17 22:21:11 -04:00
|
|
|
|
public new int? ClientId { get; set; }
|
2020-05-22 21:29:41 -04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// only look for messages sent after this date
|
|
|
|
|
/// </summary>
|
2022-06-16 19:03:23 -04:00
|
|
|
|
public DateTime? SentAfter { get; set; }
|
2020-05-22 21:29:41 -04:00
|
|
|
|
|
2023-08-26 23:56:37 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The time associated with SentAfter date
|
|
|
|
|
/// </summary>
|
2023-08-29 13:31:00 -04:00
|
|
|
|
public string SentAfterTime { get; set; }
|
2023-08-26 23:56:37 -04:00
|
|
|
|
|
2023-08-29 13:31:00 -04:00
|
|
|
|
public DateTime? SentAfterDateTime => SentAfter?.Add(string.IsNullOrEmpty(SentAfterTime) ? TimeSpan.Zero : TimeSpan.Parse(SentAfterTime));
|
2023-08-26 23:56:37 -04:00
|
|
|
|
|
2020-05-22 21:29:41 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// only look for messages sent before this date0
|
|
|
|
|
/// </summary>
|
2023-08-26 23:56:37 -04:00
|
|
|
|
public DateTime SentBefore { get; set; } = DateTime.UtcNow.Date;
|
|
|
|
|
|
2023-08-29 13:31:00 -04:00
|
|
|
|
public string SentBeforeTime { get; set; }
|
2020-08-20 11:38:11 -04:00
|
|
|
|
|
2023-08-29 13:31:00 -04:00
|
|
|
|
public DateTime? SentBeforeDateTime =>
|
|
|
|
|
SentBefore.Add(string.IsNullOrEmpty(SentBeforeTime) ? TimeSpan.Zero : TimeSpan.Parse(SentBeforeTime));
|
2023-08-26 23:56:37 -04:00
|
|
|
|
|
|
|
|
|
public bool IsExactMatch { get; set; }
|
|
|
|
|
|
2020-08-20 11:38:11 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// indicates if the chat is on the meta page
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool IsProfileMeta { get; set; }
|
2020-05-22 21:29:41 -04:00
|
|
|
|
}
|
|
|
|
|
}
|