using Hotline.Application.Snapshot;
using Hotline.Share.Dtos.Snapshot;
using Microsoft.AspNetCore.Mvc;

namespace Hotline.Api.Controllers.Snapshot;

/// <summary>
/// 随手拍统计
/// </summary>
public class BiSnapshotController : BaseController
{
    private readonly IBiSnapshotApplication _biSnapshotApplication;

    public BiSnapshotController(IBiSnapshotApplication biSnapshotApplication)
    {
        _biSnapshotApplication = biSnapshotApplication;
    }

    /// <summary>
    /// 随手拍统计
    /// </summary>
    /// <returns></returns>
    [HttpGet("statistics")]
    public async Task<SnapshotStatisticsOutDto> GetSnapshotStatisticsAsync([FromBody] SnapshotStatisticsInDto dto)
        =>  await _biSnapshotApplication.GetSnapshotStatisticsAsync(dto, HttpContext.RequestAborted);

}
