mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-11 23:58:08 -05:00
[issue 135] enhanced search
implement enhanced search for chat messages
This commit is contained in:
33
Plugins/Web/StatsWeb/Dtos/ChatSearchQuery.cs
Normal file
33
Plugins/Web/StatsWeb/Dtos/ChatSearchQuery.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using SharedLibraryCore.Dtos;
|
||||
using System;
|
||||
|
||||
namespace StatsWeb.Dtos
|
||||
{
|
||||
public class ChatSearchQuery : PaginationInfo
|
||||
{
|
||||
/// <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>
|
||||
public int? ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// only look for messages sent after this date
|
||||
/// </summary>
|
||||
public DateTime SentAfter { get; set; } = DateTime.UtcNow.AddYears(-100);
|
||||
|
||||
/// <summary>
|
||||
/// only look for messages sent before this date0
|
||||
/// </summary>
|
||||
public DateTime SentBefore { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
}
|
32
Plugins/Web/StatsWeb/Dtos/ChatSearchResult.cs
Normal file
32
Plugins/Web/StatsWeb/Dtos/ChatSearchResult.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
|
||||
namespace StatsWeb.Dtos
|
||||
{
|
||||
public class ChatSearchResult
|
||||
{
|
||||
/// <summary>
|
||||
/// name of the client
|
||||
/// </summary>
|
||||
public string ClientName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// client id
|
||||
/// </summary>
|
||||
public int ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// hostname of the server
|
||||
/// </summary>
|
||||
public string ServerName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// chat message
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// date the chat occured on
|
||||
/// </summary>
|
||||
public DateTime Date { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user