- Introduced Telegram.Bot package for bot functionality. - Updated user management to include Telegram linking and blocking features. - Enhanced activation request handling with notifications via Telegram. - Added new database entities for Telegram link tokens and login requests. - Implemented traffic synchronization for client stats in the XuiPanelGateway. - Updated application structure to support new test projects and improved dependency injection for Telegram services.
30 lines
988 B
C#
30 lines
988 B
C#
namespace PnvPanel.Domain.Configs;
|
||
|
||
/// <summary>
|
||
/// Точка истории трафика. Id — long (не Guid, как у Entity) — таблица растёт быстро,
|
||
/// авто-инкремент компактнее для высокочастотной записи. TTL-ретеншн — см. TrafficRetentionService.
|
||
/// </summary>
|
||
public sealed class TrafficSample
|
||
{
|
||
public long Id { get; private set; }
|
||
public Guid ConfigId { get; private set; }
|
||
public DateTimeOffset Timestamp { get; private set; }
|
||
public long UpBytes { get; private set; }
|
||
public long DownBytes { get; private set; }
|
||
|
||
private TrafficSample()
|
||
{
|
||
}
|
||
|
||
public static TrafficSample Create(Guid configId, DateTimeOffset timestamp, long upBytes, long downBytes)
|
||
{
|
||
return new TrafficSample
|
||
{
|
||
ConfigId = configId,
|
||
Timestamp = timestamp,
|
||
UpBytes = upBytes,
|
||
DownBytes = downBytes,
|
||
};
|
||
}
|
||
}
|