using Dpz.Core.Public.ViewModel.DynamicPages;
namespace Dpz.Core.Service.RepositoryService;
/// <summary>
/// 动态页
/// </summary>
public interface IDynamicPageService
{
/// <summary>
/// 创建新的动态页
/// </summary>
/// <param name="vmCreateDynamicPage"></param>
/// <returns></returns>
Task CreateAsync(VmCreateDynamicPage vmCreateDynamicPage);
/// <summary>
/// 根据ID查找动态页
/// </summary>
/// <param name="id"></param>
/// <param name="account"></param>
/// <returns></returns>
Task<VmDynamicPageDetail?> FindAsync(string id,string? account = null);
/// <summary>
/// 修改动态也内容
/// </summary>
/// <param name="viewModel"></param>
/// <returns></returns>
Task EditContentAsync(VmEditDynamicPage viewModel);
/// <summary>
/// 删除动态页
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task DeleteAsync(params string[] id);
/// <summary>
/// 获取动态页分页信息
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="name"></param>
/// <param name="creatorName"></param>
/// <returns></returns>
Task<IPagedList<VmDynamicPage>> GetPageAsync(int pageIndex, int pageSize, string? name,string? creatorName = null);
/// <summary>
/// 是否存在
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task<bool> IsExistsAsync(string id);
}