using System.Linq;
using System.Threading.Tasks;
using GxPress.Common.Page;
using GxPress.Entity;
using GxPress.Repository.Interface;
using GxPress.Request.Slide;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace GxPress.Api.AppControllers
{
    /// <summary>
    /// 审批轮播
    /// </summary>
    [Route("api/app/slide")]
    [ApiController]
    [Authorize]
    public class SlideController : ControllerBase
    {
        private readonly ISlideRepository _slideRepository;

        public SlideController(ISlideRepository slideRepository)
        {
            _slideRepository = slideRepository;
        }

      
        /// <summary>
        /// App列表
        /// </summary>
        /// <returns></returns>
        [HttpGet("list")]
        public async Task<PagedList<Slide>> GetList(SlideSearchRequest request)
        {
            var result = await _slideRepository.GetListAsync(request);
            return result;
        }


    }
}