using APT.BaseData.Domain.Entities;
using APT.BaseData.Domain.Entities.Platform;
using APT.BaseData.Domain.Enums;
using APT.BaseData.Domain.IServices;
using APT.Infrastructure.Core;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;

using APT.Utility;namespace APT.PF.WebApiControllers.Api.PF
{
    #region  MesLog- mes 日志
    /// <summary>
    ///  
    /// </summary>
    [Route("api/PF/MesLog")]
    public partial class MesLogController : AuthorizeApiController<T_PF_ECM_LOG>
    {
        /// <summary>
        /// 查询所有数据
        /// </summary>
        /// <param name="filter">过滤实体</param>
        /// <returns></returns>
        [HttpPost, Route("Entities")]
        public JsonActionResult<IEnumerable<T_PF_ECM_LOG>> Entities([FromBody]KeywordFilter filter)
        {
            return WitEntities(null, filter);
        }
        /// <summary>
        /// 排序查询所有数据
        /// </summary>
        /// <param name="filter">过滤实体</param>
        /// <returns></returns>

        [HttpPost, Route("OrderEntities")]
        public JsonActionResult<IEnumerable<T_PF_ECM_LOG>> OrderEntities([FromBody]KeywordFilter filter)
        {
            return WitOrderEntities(null, filter);
        }
        /// <summary>
        /// 分页查询数据
        /// </summary>
        /// <param name="pageFilter">分页过滤实体</param>
        /// <returns></returns>
        [HttpPost, Route("Paged")]
        public PagedActionResult<T_PF_ECM_LOG> Paged([FromBody]KeywordPageFilter pageFilter)
        {
            return WitPaged(null, pageFilter);
        }
        /// <summary>
        /// 排序分页查询数据
        /// </summary>
        /// <param name="pageFilter">分页过滤实体</param>
        /// <returns></returns>
        [HttpPost, Route("OrderPaged")]
        public PagedActionResult<T_PF_ECM_LOG> OrderPaged([FromBody]KeywordPageFilter pageFilter)
        {
            return WitOrderPaged(null, pageFilter);
        }
        /// <summary>
        /// 根据主键删除数据
        /// </summary>
        /// <param name="id">主键ID</param>
        /// <returns></returns>
        [HttpGet, Route("Delete")]
        public JsonActionResult<bool> Delete(string id)
        {
            return WitRealDelete(id);
        }

        /// <summary>
        /// 更新或新增数据
        /// </summary>
        /// <param name="entity">对象实体</param>
        /// <returns></returns>
        [HttpPost, Route("Update")]
        public JsonActionResult<bool> Update([FromBody]T_PF_ECM_LOG entity)
        {
            return WitUpdate(entity);
        }

        /// <summary>
        /// 批量删除数据
        /// </summary>
        /// <param name="ids">id字符串（id用逗号分隔）</param>
        /// <returns></returns>
        [HttpGet, Route("BatchDelete")]
        public JsonActionResult<bool> BatchDelete(string ids)
        {
            return WitRealBatchDelete(ids);
        }

        /// <summary>
        /// 获得单条实体数据
        /// </summary>
        /// <param name="filter">过滤实体</param>
        /// <returns></returns>
        [HttpPost, Route("Get")]
        public JsonActionResult<T_PF_ECM_LOG> Get([FromBody] KeywordFilter filter)
        {
            return WitEntity(null, filter);
        }
    }
    #endregion
}
