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.
This commit is contained in:
Leonid Pershin
2026-07-02 01:01:03 +03:00
parent 1a8d33efa3
commit 7b6fe9ad78
142 changed files with 7570 additions and 22 deletions
@@ -0,0 +1,29 @@
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,
};
}
}