Files
PnvPanel/backend/src/PnvPanel.Domain/Configs/TrafficSample.cs
T
Leonid Pershin 7b6fe9ad78 Add Telegram bot integration and enhance user management features
- 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.
2026-07-02 01:01:03 +03:00

30 lines
988 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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,
};
}
}