feat: 新增角色查看主题权限

This commit is contained in:
橙子
2025-01-19 18:40:42 +08:00
parent 7994e66283
commit 9960c63f59
14 changed files with 182 additions and 290 deletions

View File

@@ -2,6 +2,7 @@ using Volo.Abp.Application.Dtos;
using Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser;
using Yi.Framework.Bbs.Application.Contracts.Dtos.DiscussLable;
using Yi.Framework.Bbs.Application.Contracts.Dtos.Plate;
using Yi.Framework.Bbs.Domain.Shared.Consts;
using Yi.Framework.Bbs.Domain.Shared.Enums;
using Yi.Framework.Rbac.Application.Contracts.Dtos.User;
@@ -14,7 +15,6 @@ namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss
/// </summary>
public bool IsDisableCreateComment { get; set; }
public string Title { get; set; }
public string? Types { get; set; }
public string? Introduction { get; set; }
public int AgreeNum { get; set; }
public int SeeNum { get; set; }
@@ -37,12 +37,33 @@ namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Discuss
public DateTime CreationTime { get; set; }
public DiscussPermissionTypeEnum PermissionType { get; set; }
public bool IsAgree { get; set; } = false;
public List<Guid>? PermissionUserIds { get; set; }
public List<string> PermissionRoleCodes { get; set; } = new List<string>();
public BbsUserGetListOutputDto User { get; set; }
public PlateGetOutputDto Plate { get; set; }
public List<Guid>? DiscussLables { get; set; } = new List<Guid>();
public List<Guid>? DiscussLableIds { get; set; } = new List<Guid>();
public List<DiscussLableGetOutputDto> Lables { get; set; } =new List<DiscussLableGetOutputDto>();
public bool HasPermission { get;internal set; }
/// <summary>
/// 设置权限
/// </summary>
public void SetPassPermission()
{
HasPermission = true;
}
/// <summary>
/// 设置无权限
/// </summary>
public void SetNoPermission()
{
HasPermission = false;
Content=DiscussConst.Privacy;
}
}
}