feat(ops): 배포 알림과 텔레그램 리포트 추가

This commit is contained in:
2026-06-28 18:39:28 +09:00
parent d2cfcd90f0
commit 033883aac5
10 changed files with 333 additions and 4 deletions
@@ -40,6 +40,33 @@ public class ClientRepository(IDbConnectionFactory connectionFactory) : BaseRepo
new { Id = id });
}
public async Task<Client?> GetByEmailAsync(string email, CancellationToken ct = default)
{
using var conn = Conn();
return await conn.QueryFirstOrDefaultAsync<Client>(
$"SELECT {SelectColumns} FROM clients WHERE email = @Email",
new { Email = email });
}
public async Task<Client?> GetByPhoneAsync(string phone, CancellationToken ct = default)
{
using var conn = Conn();
return await conn.QueryFirstOrDefaultAsync<Client>(
$"SELECT {SelectColumns} FROM clients WHERE phone = @Phone",
new { Phone = phone });
}
public async Task<int> CountByCreatedAtRangeAsync(DateTime startDateUtc, DateTime endDateUtc, CancellationToken ct = default)
{
using var conn = Conn();
return await conn.ExecuteScalarAsync<int>(
@"SELECT COUNT(*)
FROM clients
WHERE created_at >= @StartDateUtc
AND created_at <= @EndDateUtc",
new { StartDateUtc = startDateUtc, EndDateUtc = endDateUtc });
}
public async Task<int> CreateAsync(Client client, CancellationToken ct = default)
{
using var conn = Conn();