网站首页 网站源码
website
站点相关全部源代码,隐藏了一些关于服务器的信息
using System.Threading.Tasks;
using Dpz.Core.Public.ViewModel.V4;
using Dpz.Core.Web.Pager;

namespace Dpz.Core.Service.V4.Services;

public interface IMumbleService
{
    /// <summary>
    /// 创建新的碎碎念
    /// </summary>
    /// <param name="talk"></param>
    /// <returns></returns>
    [CacheModule(Clear = true)]
    Task<VmMumble> CreateAsync(VmMumble talk);

    /// <summary>
    /// 编辑碎碎念
    /// </summary>
    /// <param name="mumble"></param>
    /// <returns></returns>
    [CacheModule(Clear = true)]
    Task<VmMumble?> EditContentAsync(VmMumble mumble);

    /// <summary>
    /// 获取分页信息
    /// </summary>
    /// <param name="pageIndex"></param>
    /// <param name="pageSize"></param>
    /// <param name="content"></param>
    /// <param name="account">账号</param>
    /// <returns></returns>
    [CacheModule]
    Task<IPagedList<VmMumble>> GetPagesAsync(int pageIndex, int pageSize, string? content = null,string? account = null);
    
    /// <summary>
    /// 根据ID查找碎碎念信息
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    [CacheModule]
    Task<VmMumble?> FindAsync(string id);

    /// <summary>
    /// 根据ID删除碎碎念信息
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    [CacheModule(Clear = true)]
    Task DeleteAsync(params string[] id);
    
    /// <summary>
    /// 点赞
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    [CacheModule(Clear = true)]
    Task<VmMumble?> LikeAsync(string id);
}
loading