feat:全基础流程跑通

This commit is contained in:
橙子
2023-04-15 22:44:33 +08:00
parent 9b1a978cb5
commit 1655870d4d
151 changed files with 3120 additions and 209 deletions

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Consts
{
/// <summary>
/// 常量定义
/// </summary>
public class ArticleConst
{
public const string = "传入的文章id不存在";
public const string = "该文章无权限";
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Consts
{
/// <summary>
/// 常量定义
/// </summary>
public class CommentConst
{
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Consts
{
/// <summary>
/// 常量定义
/// </summary>
public class DiscussConst
{
public const string = "传入的主题id不存在";
public const string = "【私密】您无该主题权限,可联系作者申请开放";
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Consts
{
/// <summary>
/// 常量定义
/// </summary>
public class LabelConst
{
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Consts
{
/// <summary>
/// 常量定义
/// </summary>
public class PlateConst
{
public const string = "传入的板块id不存在";
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Dtos.Argee
{
public class AgreeDto
{
public AgreeDto(bool isAgree)
{
IsAgree = isAgree;
if (isAgree)
{
Message = "点赞成功,点赞+1";
}
else
{
Message = "取消点赞,点赞-1";
}
}
public bool IsAgree { get; set; }
public string Message { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using System.Collections.Generic;
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Bbs.Dtos.Article
{
public class ArticleAllOutputDto : IEntityDto<long>
{
public long Id { get; set; }
//批量查询,不给内容,性能考虑
//public string Content { get; set; }
public string Name { get; set; }
public long DiscussId { get; set; }
public long ParentId { get; set; }
public List<ArticleAllOutputDto> Children { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Dtos.Article
{
/// <summary>
/// Article输入创建对象
/// </summary>
public class ArticleCreateInputVo
{
public string Content { get; set; }
public string Name { get; set; }
public long DiscussId { get; set; }
public long ParentId { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using Yi.Framework.Infrastructure.Ddd.Dtos;
namespace Yi.Furion.Core.Bbs.Dtos.Article
{
public class ArticleGetListInputVo : PagedAndSortedResultRequestDto
{
public long Id { get; set; }
public string Content { get; set; }
public string Name { get; set; }
public long DiscussId { get; set; }
public long ParentId { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using System.Collections.Generic;
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Bbs.Dtos.Article
{
public class ArticleGetListOutputDto : IEntityDto<long>
{
public long Id { get; set; }
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD>ܿ<EFBFBD><DCBF><EFBFBD>
//public string Content { get; set; }
public string Name { get; set; }
public long DiscussId { get; set; }
public List<ArticleGetListOutputDto> Children { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Bbs.Dtos.Article
{
public class ArticleGetOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public string Content { get; set; }
public string Name { get; set; }
public long DiscussId { get; set; }
public long ParentId { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
namespace Yi.Furion.Core.Bbs.Dtos.Article
{
public class ArticleUpdateInputVo
{
public string Content { get; set; }
public string Name { get; set; }
public long DiscussId { get; set; }
public long ParentId { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Dtos.Banner
{
/// <summary>
/// Banner输入创建对象
/// </summary>
public class BannerCreateInputVo
{
public string Name { get; set; }
public string Logo { get; set; }
public string Color { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
using Yi.Framework.Infrastructure.Ddd.Dtos;
namespace Yi.Furion.Core.Bbs.Dtos.Banner
{
public class BannerGetListInputVo : PagedAndSortedResultRequestDto
{
public string Name { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Bbs.Dtos.Banner
{
public class BannerGetListOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public string Name { get; set; }
public string Logo { get; set; }
public string Color { get; set; }
public DateTime CreationTime { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Bbs.Dtos.Banner
{
public class BannerGetOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public string Name { get; set; }
public string Logo { get; set; }
public string Color { get; set; }
public DateTime CreationTime { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace Yi.Furion.Core.Bbs.Dtos.Banner
{
public class BannerUpdateInputVo
{
public string Name { get; set; }
public string Logo { get; set; }
public string Color { get; set; }
}
}

View File

@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;
namespace Yi.Furion.Core.Bbs.Dtos.Comment
{
/// <summary>
/// Comment输入创建对象
/// </summary>
public class CommentCreateInputVo
{
/// <summary>
/// 评论id
/// </summary>
public string Content { get; set; }
/// <summary>
/// 主题id
/// </summary>
public long DiscussId { get; set; }
/// <summary>
/// 第一层评论id第一层为0
/// </summary>
public long RootId { get; set; }
/// <summary>
/// 被回复的CommentId第一层为0
/// </summary>
public long ParentId { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using System;
namespace Yi.Furion.Core.Bbs.Dtos.Comment
{
public class CommentGetListInputVo
{
public DateTime? creationTime { get; set; }
public string Content { get; set; }
//Ӧ<><D3A6>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ī<EFBFBD><C4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ
public long? DiscussId { get; set; }
}
}

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
using Yi.Furion.Core.Rbac.Dtos.User;
namespace Yi.Furion.Core.Bbs.Dtos.Comment
{
/// <summary>
/// <20><><EFBFBD>۶෴
/// </summary>
public class CommentGetListOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public DateTime? CreationTime { get; set; }
public string Content { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD>id
/// </summary>
public long DiscussId { get; set; }
public long ParentId { get; set; }
public long RootId { get; set; }
/// <summary>
/// <20>û<EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>Ϣ
/// </summary>
public UserGetOutputDto CreateUser { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD>۵<EFBFBD><DBB5>û<EFBFBD><C3BB><EFBFBD>Ϣ
/// </summary>
public UserGetOutputDto CommentedUser { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>Σ<EFBFBD><CEA3><EFBFBD><EFBFBD>Ǵ<EFBFBD><C7B4><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ά<EFBFBD><CEAC><EFBFBD><EFBFBD><E9A3AC>Childrenֻ<6E><D6BB><EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>һ<EFBFBD><D2BB>
/// </summary>
public List<CommentGetListOutputDto> Children { get; set; } = new List<CommentGetListOutputDto>();
}
}

View File

@@ -0,0 +1,36 @@
using System;
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
using Yi.Furion.Core.Rbac.Dtos.User;
namespace Yi.Furion.Core.Bbs.Dtos.Comment
{
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD>أ<EFBFBD><D8A3><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ۼ<EFBFBD><DBBC><EFBFBD>
/// </summary>
public class CommentGetOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public DateTime? CreateTime { get; set; }
public string Content { get; set; }
public long DiscussId { get; set; }
/// <summary>
/// <20>û<EFBFBD>id<69><64><EFBFBD><EFBFBD>Ϊ<EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public UserGetOutputDto User { get; set; }
/// <summary>
/// <20><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>id
/// </summary>
public long RootId { get; set; }
/// <summary>
/// <20><><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>CommentId
/// </summary>
public long ParentId { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
namespace Yi.Furion.Core.Bbs.Dtos.Comment
{
public class CommentUpdateInputVo
{
public string Content { get; set; }
//<2F><><EFBFBD>²<EFBFBD><C2B2>ܽ<EFBFBD><DCBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Furion.Core.Bbs.Enums;
namespace Yi.Furion.Core.Bbs.Dtos.Discuss
{
/// <summary>
/// Discuss输入创建对象
/// </summary>
public class DiscussCreateInputVo
{
public string Title { get; set; }
public string Types { get; set; }
public string Introduction { get; set; }
public DateTime? CreateTime { get; set; } = DateTime.Now;
public string Content { get; set; }
public string Color { get; set; }
public long PlateId { get; set; }
/// <summary>
/// 默认公开
/// </summary>
public DiscussPermissionTypeEnum PermissionType { get; set; } = DiscussPermissionTypeEnum.Public;
/// <summary>
/// 封面
/// </summary>
public string Cover { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using Yi.Framework.Infrastructure.Ddd.Dtos;
using Yi.Furion.Core.Bbs.Enums;
namespace Yi.Furion.Core.Bbs.Dtos.Discuss
{
public class DiscussGetListInputVo : PagedAndSortedResultRequestDto
{
public string Title { get; set; }
public long? PlateId { get; set; }
//Ĭ<>ϲ<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD>ö<EFBFBD>
public bool IsTop { get; set; } = false;
//<2F><>ѯ<EFBFBD><D1AF>ʽ
public QueryDiscussTypeEnum Type { get; set; } = QueryDiscussTypeEnum.New;
}
}

View File

@@ -0,0 +1,95 @@
using System;
using System.Collections.Generic;
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
using Yi.Furion.Core.Bbs.Consts;
using Yi.Furion.Core.Bbs.Enums;
using Yi.Furion.Core.Rbac.Dtos.User;
namespace Yi.Furion.Core.Bbs.Dtos.Discuss
{
public class DiscussGetListOutputDto : IEntityDto<long>
{
/// <summary>
/// <20>Ƿ<EFBFBD><C7B7>ѵ<EFBFBD><D1B5><EFBFBD>
/// </summary>
public bool IsAgree { get; set; }
public long Id { 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; }
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD>ܿ<EFBFBD><DCBF><EFBFBD>
//public string Content { get; set; }
public string Color { get; set; }
public long PlateId { get; set; }
//<2F>Ƿ<EFBFBD><C7B7>ö<EFBFBD><C3B6><EFBFBD>Ĭ<EFBFBD><C4AC>false
public bool IsTop { get; set; }
public DiscussPermissionTypeEnum PermissionType { get; set; }
//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ֹ<EFBFBD><D6B9>Ĭ<EFBFBD><C4AC>false
public bool IsBan { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD>
/// </summary>
public string Cover { get; set; }
//˽<><CBBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ж<EFBFBD>codeȨ<65><C8A8>
public string PrivateCode { get; set; }
public DateTime CreationTime { get; set; }
public List<long> PermissionUserIds { get; set; }
public UserGetListOutputDto User { get; set; }
public void SetBan()
{
Title = DiscussConst.˽<EFBFBD><EFBFBD>;
Introduction = "";
Cover = null;
//<2F><><EFBFBD><EFBFBD>ֹ
IsBan = true;
}
}
public static class DiscussGetListOutputDtoExtension
{
public static void ApplyPermissionTypeFilter(this List<DiscussGetListOutputDto> dtos, long userId)
{
dtos?.ForEach(dto =>
{
switch (dto.PermissionType)
{
case DiscussPermissionTypeEnum.Public:
break;
case DiscussPermissionTypeEnum.Oneself:
//<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><C7BD>Լ<EFBFBD><D4BC>ɼ<EFBFBD><C9BC><EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD>ǵ<EFBFBD>ǰ<EFBFBD><C7B0>¼<EFBFBD>û<EFBFBD>
if (dto.User.Id != userId)
{
dto.SetBan();
}
break;
case DiscussPermissionTypeEnum.User:
//<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>ֿɼ<D6BF><C9BC><EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD>ǵ<EFBFBD>ǰ<EFBFBD><C7B0>¼<EFBFBD>û<EFBFBD> Ҳ <20><><EFBFBD>ڿɼ<DABF><C9BC>û<EFBFBD><C3BB>б<EFBFBD><D0B1><EFBFBD>
if (dto.User.Id != userId && !dto.PermissionUserIds.Contains(userId))
{
dto.SetBan();
}
break;
default:
break;
}
});
}
}
}

View File

@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
using Yi.Furion.Core.Bbs.Enums;
using Yi.Furion.Core.Rbac.Dtos.User;
namespace Yi.Furion.Core.Bbs.Dtos.Discuss
{
public class DiscussGetOutputDto : IEntityDto<long>
{
public long Id { 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; }
public string Content { get; set; }
public string Color { get; set; }
public long PlateId { get; set; }
//<2F>Ƿ<EFBFBD><C7B7>ö<EFBFBD><C3B6><EFBFBD>Ĭ<EFBFBD><C4AC>false
public bool IsTop { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD>
/// </summary>
public string Cover { get; set; }
//<2F>Ƿ<EFBFBD>˽<EFBFBD>У<EFBFBD>Ĭ<EFBFBD><C4AC>false
public bool IsPrivate { get; set; }
//˽<><CBBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>ж<EFBFBD>codeȨ<65><C8A8>
public string PrivateCode { get; set; }
public DateTime CreationTime { get; set; }
public DiscussPermissionTypeEnum PermissionType { get; set; }
public List<long> PermissionUserIds { get; set; }
public UserGetListOutputDto User { get; set; }
}
}

View File

@@ -0,0 +1,25 @@
using System.Collections.Generic;
using Yi.Furion.Core.Bbs.Enums;
namespace Yi.Furion.Core.Bbs.Dtos.Discuss
{
public class DiscussUpdateInputVo
{
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; }
public string Content { get; set; }
public string Color { get; set; }
public List<long> PermissionUserIds { get; set; }
public DiscussPermissionTypeEnum PermissionType { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD>
/// </summary>
public string Cover { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Dtos.MyType
{
/// <summary>
/// Label输入创建对象
/// </summary>
public class MyTypeCreateInputVo
{
public string Name { get; set; }
public string Color { get; set; }
public string BackgroundColor { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Infrastructure.Ddd.Dtos;
namespace Yi.Furion.Core.Bbs.Dtos.MyType
{
public class MyTypeGetListInputVo : PagedAndSortedResultRequestDto
{
public long Id { get; set; }
public string Name { get; set; }
public string Color { get; set; }
public string BackgroundColor { get; set; }
public long UserId { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Bbs.Dtos.MyType
{
public class MyTypeGetListOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public string Name { get; set; }
public string Color { get; set; }
public string BackgroundColor { get; set; }
public long UserId { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Bbs.Dtos.MyType
{
public class MyTypeOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public string Name { get; set; }
public string Color { get; set; }
public string BackgroundColor { get; set; }
public long UserId { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Dtos.MyType
{
public class MyTypeUpdateInputVo
{
public long Id { get; set; }
public string Name { get; set; }
public string Color { get; set; }
public string BackgroundColor { get; set; }
public long UserId { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Dtos.Plate
{
/// <summary>
/// Plate输入创建对象
/// </summary>
public class PlateCreateInputVo
{
public long Id { get; set; }
public string Name { get; set; }
public string Logo { get; set; }
public string Introduction { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
using Yi.Framework.Infrastructure.Ddd.Dtos;
namespace Yi.Furion.Core.Bbs.Dtos.Plate
{
public class PlateGetListInputVo : PagedAndSortedResultRequestDto
{
public long Id { get; set; }
public string Name { get; set; }
public string Logo { get; set; }
public string Introduction { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Bbs.Dtos.Plate
{
public class PlateGetListOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public string Name { get; set; }
public string Logo { get; set; }
public string Introduction { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Bbs.Dtos.Plate
{
public class PlateGetOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public string Name { get; set; }
public string Logo { get; set; }
public string Introduction { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Dtos.Plate
{
public class PlateUpdateInputVo
{
public long Id { get; set; }
public string Name { get; set; }
public string Logo { get; set; }
public string Introduction { get; set; }
}
}

View File

@@ -0,0 +1,35 @@
using System;
using SqlSugar;
using Yi.Framework.Infrastructure.Data.Auditing;
using Yi.Framework.Infrastructure.Ddd.Entities;
using Yi.Framework.Infrastructure.Helper;
namespace Yi.Furion.Core.Bbs.Entities
{
[SugarTable("Agree")]
public class AgreeEntity : IEntity<long>, ICreationAuditedObject
{
public AgreeEntity()
{
}
public AgreeEntity(long discussId)
{
DiscussId = discussId;
}
[SugarColumn(IsPrimaryKey = true)]
public long Id { get; set; } = SnowflakeHelper.NextId;
public DateTime CreationTime { get; set; }
/// <summary>
/// 主题id
/// </summary>
public long DiscussId { get; set; }
/// <summary>
/// 创建者
/// </summary>
public long? CreatorId { get; set; }
}
}

View File

@@ -0,0 +1,58 @@
using System.Collections.Generic;
using System.Linq;
using SqlSugar;
using Yi.Framework.Infrastructure.Data.Entities;
using Yi.Framework.Infrastructure.Ddd.Entities;
namespace Yi.Furion.Core.Bbs.Entities
{
[SugarTable("Article")]
public class ArticleEntity : IEntity<long>, ISoftDelete
{
[SugarColumn(IsPrimaryKey = true)]
public long Id { get; set; }
public bool IsDeleted { get; set; }
[SugarColumn(Length = 999999)]
public string Content { get; set; }
public string Name { get; set; }
public long DiscussId { get; set; }
public long ParentId { get; set; }
[SugarColumn(IsIgnore = true)]
public List<ArticleEntity> Children { get; set; }
}
public static class ArticleEntityExtensions
{
/// <summary>
/// 平铺自己
/// </summary>
/// <param name="entities"></param>
/// <returns></returns>
public static List<ArticleEntity> Tile(this List<ArticleEntity> entities)
{
if (entities is null) return new List<ArticleEntity>();
var result = new List<ArticleEntity>();
return StartRecursion(entities, result);
}
private static List<ArticleEntity> StartRecursion(List<ArticleEntity> entities, List<ArticleEntity> result)
{
foreach (var entity in entities)
{
result.Add(entity);
if (entity.Children is not null && entity.Children.Where(x => x.IsDeleted == false).Count() > 0)
{
StartRecursion(entity.Children, result);
}
}
return result;
}
}
}

View File

@@ -0,0 +1,26 @@
using System;
using SqlSugar;
using Yi.Framework.Infrastructure.Data.Auditing;
using Yi.Framework.Infrastructure.Data.Entities;
using Yi.Framework.Infrastructure.Ddd.Entities;
namespace Yi.Furion.Core.Bbs.Entities
{
[SugarTable("Banner")]
public class BannerEntity : IEntity<long>, ISoftDelete, IAuditedObject
{
[SugarColumn(IsPrimaryKey = true)]
public long Id { get; set; }
public string Name { get; set; }
public string Logo { get; set; }
public string Color { get; set; }
public bool IsDeleted { get; set; }
public DateTime CreationTime { get; set; }
public long? CreatorId { get; set; }
public long? LastModifierId { get; set; }
public DateTime? LastModificationTime { get; set; }
}
}

View File

@@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using SqlSugar;
using Yi.Framework.Infrastructure.Data.Auditing;
using Yi.Framework.Infrastructure.Data.Entities;
using Yi.Framework.Infrastructure.Ddd.Entities;
using Yi.Furion.Core.Rbac.Entities;
namespace Yi.Furion.Core.Bbs.Entities
{
/// <summary>
/// 评论表
/// </summary>
[SugarTable("Comment")]
public class CommentEntity : IEntity<long>, ISoftDelete, IAuditedObject
{
/// <summary>
/// 采用二维数组方式,不使用树形方式
/// </summary>
public CommentEntity()
{
}
public CommentEntity(long discussId)
{
DiscussId = discussId;
}
[SugarColumn(IsPrimaryKey = true)]
public long Id { get; set; }
public bool IsDeleted { get; set; }
public string Content { get; set; }
public long DiscussId { get; set; }
/// <summary>
/// 被回复的CommentId
/// </summary>
public long ParentId { get; set; }
public DateTime CreationTime { get; set; }
public long RootId { get; set; }
[SugarColumn(IsIgnore = true)]
public List<CommentEntity> Children { get; set; } = new();
/// <summary>
/// 用户,评论人用户信息
/// </summary>
[Navigate(NavigateType.OneToOne, nameof(CreatorId))]
public UserEntity CreateUser { get; set; }
/// <summary>
/// 被评论的用户信息
/// </summary>
[SugarColumn(IsIgnore = true)]
public UserEntity CommentedUser { get; set; }
public long? CreatorId { get; set; }
public long? LastModifierId { get; set; }
public DateTime? LastModificationTime { get; set; }
}
}

View File

@@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
using SqlSugar;
using Yi.Framework.Infrastructure.Data.Auditing;
using Yi.Framework.Infrastructure.Data.Entities;
using Yi.Framework.Infrastructure.Ddd.Entities;
using Yi.Furion.Core.Bbs.Enums;
namespace Yi.Furion.Core.Bbs.Entities
{
[SugarTable("Discuss")]
public class DiscussEntity : IEntity<long>, ISoftDelete, IAuditedObject
{
public DiscussEntity()
{
}
public DiscussEntity(long plateId)
{
PlateId = plateId;
}
[SugarColumn(IsPrimaryKey = true)]
public long Id { 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; }
/// <summary>
/// 封面
/// </summary>
public string Cover { get; set; }
[SugarColumn(Length = 999999)]
public string Content { get; set; }
public string Color { get; set; }
public bool IsDeleted { get; set; }
//是否置顶默认false
public bool IsTop { get; set; }
public DiscussPermissionTypeEnum PermissionType { get; set; }
public long PlateId { get; set; }
public DateTime CreationTime { get; set; }
public long? CreatorId { get; set; }
public long? LastModifierId { get; set; }
public DateTime? LastModificationTime { get; set; }
/// <summary>
/// 当PermissionType为部分用户时候以下列表中的用户+创建者 代表拥有权限
/// </summary>
[SugarColumn(IsJson = true)]//使用json处理
public List<long> PermissionUserIds { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Infrastructure.Ddd.Entities;
namespace Yi.Furion.Core.Bbs.Entities
{
[SugarTable("DiscussMyType")]
public class DiscussMyTypeEntity : IEntity<long>
{
[SugarColumn(IsPrimaryKey = true)]
public long Id { get; set; }
public long DiscussId { get; set; }
public long MyTypeId { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using SqlSugar;
using Yi.Framework.Infrastructure.Data.Entities;
using Yi.Framework.Infrastructure.Ddd.Entities;
namespace Yi.Furion.Core.Bbs.Entities
{
[SugarTable("MyType")]
public class MyTypeEntity : IEntity<long>, ISoftDelete
{
[SugarColumn(IsPrimaryKey = true)]
public long Id { get; set; }
public bool IsDeleted { get; set; }
public string Name { get; set; }
public string Color { get; set; }
public string BackgroundColor { get; set; }
public long UserId { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using SqlSugar;
using Yi.Framework.Infrastructure.Data.Entities;
using Yi.Framework.Infrastructure.Ddd.Entities;
namespace Yi.Furion.Core.Bbs.Entities
{
[SugarTable("Plate")]
public class PlateEntity : IEntity<long>, ISoftDelete
{
[SugarColumn(IsPrimaryKey = true)]
public long Id { get; set; }
public string Name { get; set; }
public string Logo { get; set; }
public string Introduction { get; set; }
public bool IsDeleted { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using SqlSugar;
using Yi.Framework.Infrastructure.Ddd.Entities;
namespace Yi.Furion.Core.Bbs.Entities
{
[SugarTable("Setting")]
public class SettingEntity : IEntity<long>
{
[SugarColumn(IsPrimaryKey = true)]
public long Id { get; set; }
public int CommentPage { get; set; }
public int DiscussPage { get; set; }
public int CommentExperience { get; set; }
public int DiscussExperience { get; set; }
public string Title { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Enums
{
public enum DiscussPermissionTypeEnum
{
/// <summary>
/// 默认:公开
/// </summary>
Public = 0,
/// <summary>
/// 仅自己可见
/// </summary>
Oneself,
/// <summary>
/// 部分用户可见
/// </summary>
User
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Bbs.Enums
{
public enum QueryDiscussTypeEnum
{
New,
Suggest,
Host
}
}

View File

@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Furion.EventBus;
using Yi.Furion.Core.Rbac.Etos;
namespace Yi.Furion.Core.Bbs.Etos
{
public class SeeDiscussEventSource : IEventSource
{
public SeeDiscussEventSource(SeeDiscussEventArgs payload)
{ Payload = payload; }
public string EventId => nameof(SeeDiscussEventSource);
public DateTime CreatedTime { get; set; } = DateTime.UtcNow;
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public CancellationToken CancellationToken { get; set; }
public object Payload { get; set; }
}
public class SeeDiscussEventArgs
{
public long DiscussId { get; set; }
public int OldSeeNum { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
global using Furion;
global using Furion.DatabaseAccessor;
global using Furion.DataEncryption;
global using Furion.DataValidation;
global using Furion.DependencyInjection;
global using Furion.DynamicApiController;
global using Furion.Extensions;
global using Furion.FriendlyException;
global using Furion.Logging;
global using Mapster;
global using Microsoft.AspNetCore.Authorization;
global using Microsoft.AspNetCore.Http;
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.CodeAnalysis;
global using System.ComponentModel.DataAnnotations;
global using System;
global using System.Collections.Generic;

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.ConstClasses
namespace Yi.Furion.Core.Rbac.Consts
{
/// <summary>
/// 常量定义

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.ConstClasses
namespace Yi.Furion.Core.Rbac.Consts
{
/// <summary>
/// 常量定义

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.ConstClasses
namespace Yi.Furion.Core.Rbac.Consts
{
/// <summary>
/// 常量定义

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.ConstClasses
namespace Yi.Furion.Core.Rbac.Consts
{
/// <summary>
/// 常量定义

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.ConstClasses
namespace Yi.Furion.Core.Rbac.Consts
{
/// <summary>
/// 常量定义

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.Dtos.Account
{
public class CaptchaImageDto
{
public string Code { get; set; } = string.Empty;
public Guid Uuid { get; set; } = Guid.Empty;
public byte[] Img { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.Dtos.Account
{
public class LoginInputVo
{
public string UserName { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public string Uuid { get; set; }
public string Code { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.Dtos.Account
{
public class PhoneCaptchaImageDto
{
public string Phone { get; set; }
}
}

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.Dtos.Account
{
public class RegisterDto
{
//电话号码根据code的表示来获取
/// <summary>
/// 账号
/// </summary>
public string UserName { get; set; } = string.Empty;
/// <summary>
/// 密码
/// </summary>
public string Password { get; set; } = string.Empty;
/// <summary>
/// 唯一标识码
/// </summary>
public string Uuid { get; set; }
/// <summary>
/// 电话
/// </summary>
public long Phone { get; set; }
/// <summary>
/// 验证码
/// </summary>
public string Code { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.Dtos.Account
{
public class RestPasswordDto
{
public string Password = string.Empty;
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.Dtos.Account
{
public class UpdateIconDto
{
public string Icon { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.Dtos.Account
{
public class UpdatePasswordDto
{
public string NewPassword { get; set; } = string.Empty;
public string OldPassword { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,17 @@
namespace Yi.Furion.Core.Rbac.Dtos.Config
{
/// <summary>
/// Config输入创建对象
/// </summary>
public class ConfigCreateInputVo
{
public long Id { get; set; }
public string ConfigName { get; set; } = string.Empty;
public string ConfigKey { get; set; } = string.Empty;
public string ConfigValue { get; set; } = string.Empty;
public string ConfigType { get; set; }
public int OrderNum { get; set; }
public string Remark { get; set; }
public DateTime CreationTime { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using Yi.Framework.Infrastructure.Ddd.Dtos;
namespace Yi.Furion.Core.Rbac.Dtos.Config
{
/// <summary>
/// <20><><EFBFBD>ò<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
/// </summary>
public class ConfigGetListInputVo : PagedAllResultRequestDto
{
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string ConfigName { get; set; }
/// <summary>
/// <20><><EFBFBD>ü<EFBFBD>
/// </summary>
public string ConfigKey { get; set; }
}
}

View File

@@ -0,0 +1,40 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Rbac.Dtos.Config
{
public class ConfigGetListOutputDto : IEntityDto<long>
{
public long Id { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string ConfigName { get; set; } = string.Empty;
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string ConfigKey { get; set; } = string.Empty;
/// <summary>
/// <20><><EFBFBD><EFBFBD>ֵ
/// </summary>
public string ConfigValue { get; set; } = string.Empty;
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string ConfigType { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>
/// </summary>
public int OrderNum { get; set; }
/// <summary>
/// <20><>ע
/// </summary>
public string Remark { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
/// </summary>
public DateTime CreationTime { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Rbac.Dtos.Config
{
public class ConfigGetOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public string ConfigName { get; set; } = string.Empty;
public string ConfigKey { get; set; } = string.Empty;
public string ConfigValue { get; set; } = string.Empty;
public string ConfigType { get; set; }
public int OrderNum { get; set; }
public string Remark { get; set; }
public DateTime CreationTime { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
namespace Yi.Furion.Core.Rbac.Dtos.Config
{
public class ConfigUpdateInputVo
{
public long Id { get; set; }
public string ConfigName { get; set; } = string.Empty;
public string ConfigKey { get; set; } = string.Empty;
public string ConfigValue { get; set; } = string.Empty;
public string ConfigType { get; set; }
public int OrderNum { get; set; }
public string Remark { get; set; }
public DateTime CreationTime { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.Dtos.Dept
{
/// <summary>
/// Dept输入创建对象
/// </summary>
public class DeptCreateInputVo
{
public long Id { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public bool State { get; set; }
public string DeptName { get; set; } = string.Empty;
public string DeptCode { get; set; } = string.Empty;
public string Leader { get; set; }
public long ParentId { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using Yi.Framework.Infrastructure.Ddd.Dtos;
namespace Yi.Furion.Core.Rbac.Dtos.Dept
{
public class DeptGetListInputVo : PagedAllResultRequestDto
{
public long Id { get; set; }
public bool? State { get; set; }
public string DeptName { get; set; }
public string DeptCode { get; set; }
public string Leader { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using System;
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Rbac.Dtos.Dept
{
public class DeptGetListOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public bool State { get; set; }
public string DeptName { get; set; } = string.Empty;
public string DeptCode { get; set; } = string.Empty;
public string Leader { get; set; }
public long ParentId { get; set; }
public string Remark { get; set; }
public int OrderNum { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Rbac.Dtos.Dept
{
public class DeptGetOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public bool State { get; set; }
public string DeptName { get; set; } = string.Empty;
public string DeptCode { get; set; } = string.Empty;
public string Leader { get; set; }
public string Remark { get; set; }
public long? deptId { get; set; }
public int OrderNum { get; set; }
public long ParentId { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.Dtos.Dept
{
public class DeptUpdateInputVo
{
public long Id { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public bool State { get; set; }
public string DeptName { get; set; } = string.Empty;
public string DeptCode { get; set; } = string.Empty;
public string Leader { get; set; }
public long ParentId { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
using Yi.Framework.Infrastructure.Ddd.Dtos;
namespace Yi.Furion.Core.Rbac.Dtos.LoginLog
{
public class LoginLogGetListInputVo : PagedAllResultRequestDto
{
public string LoginUser { get; set; }
public string LoginIp { get; set; }
}
}

View File

@@ -0,0 +1,32 @@
using Yi.Framework.Infrastructure.Ddd.Dtos;
namespace Yi.Furion.Core.Rbac.Dtos.LoginLog
{
public class LoginLogGetListOutputDto : EntityDto<long>
{
public DateTime CreationTime { get; }
public string LoginUser { get; set; }
public string LoginLocation { get; set; }
/// <summary>
/// 登录Ip
///</summary>
public string LoginIp { get; set; }
/// <summary>
/// 浏览器
///</summary>
public string Browser { get; set; }
/// <summary>
/// 操作系统
///</summary>
public string Os { get; set; }
/// <summary>
/// 登录信息
///</summary>
public string LogMsg { get; set; }
public long? CreatorId { get; set; }
}
}

View File

@@ -0,0 +1,28 @@
using System;
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Dtos.Menu
{
/// <summary>
/// Menu输入创建对象
/// </summary>
public class MenuCreateInputVo
{
public long Id { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public bool State { get; set; }
public string MenuName { get; set; } = string.Empty;
public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Menu;
public string PermissionCode { get; set; }
public long ParentId { get; set; }
public string MenuIcon { get; set; }
public string Router { get; set; }
public bool IsLink { get; set; }
public bool IsCache { get; set; }
public bool IsShow { get; set; } = true;
public string Remark { get; set; }
public string Component { get; set; }
public string Query { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
using Yi.Framework.Infrastructure.Ddd.Dtos;
namespace Yi.Furion.Core.Rbac.Dtos.Menu
{
public class MenuGetListInputVo : PagedAndSortedResultRequestDto
{
public bool? State { get; set; }
public string MenuName { get; set; }
}
}

View File

@@ -0,0 +1,29 @@
using System;
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Dtos.Menu
{
public class MenuGetListOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public bool State { get; set; }
public string MenuName { get; set; } = string.Empty;
public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Menu;
public string PermissionCode { get; set; }
public long ParentId { get; set; }
public string MenuIcon { get; set; }
public string Router { get; set; }
public bool IsLink { get; set; }
public bool IsCache { get; set; }
public bool IsShow { get; set; } = true;
public string Remark { get; set; }
public string Component { get; set; }
public string Query { get; set; }
public int OrderNum { get; set; }
//public List<MenuEntity>? Children { get; set; }
}
}

View File

@@ -0,0 +1,30 @@
using System;
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Dtos.Menu
{
public class MenuGetOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public bool State { get; set; }
public string MenuName { get; set; } = string.Empty;
public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Menu;
public string PermissionCode { get; set; }
public long ParentId { get; set; }
public string MenuIcon { get; set; }
public string Router { get; set; }
public bool IsLink { get; set; }
public bool IsCache { get; set; }
public bool IsShow { get; set; } = true;
public string Remark { get; set; }
public string Component { get; set; }
public string Query { get; set; }
public int OrderNum { get; set; }
//public List<MenuEntity>? Children { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
using System;
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Dtos.Menu
{
public class MenuUpdateInputVo
{
public long Id { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public bool State { get; set; }
public string MenuName { get; set; } = string.Empty;
public MenuTypeEnum MenuType { get; set; } = MenuTypeEnum.Menu;
public string PermissionCode { get; set; }
public long ParentId { get; set; }
public string MenuIcon { get; set; }
public string Router { get; set; }
public bool IsLink { get; set; }
public bool IsCache { get; set; }
public bool IsShow { get; set; } = true;
public string Remark { get; set; }
public string Component { get; set; }
public string Query { get; set; }
//public List<MenuEntity>? Children { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.Dtos.Post
{
/// <summary>
/// Post输入创建对象
/// </summary>
public class PostCreateInputVo
{
public long Id { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public bool State { get; set; }
public string PostCode { get; set; } = string.Empty;
public string PostName { get; set; } = string.Empty;
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
using Yi.Framework.Infrastructure.Ddd.Dtos;
namespace Yi.Furion.Core.Rbac.Dtos.Post
{
public class PostGetListInputVo : PagedAndSortedResultRequestDto
{
public bool? State { get; set; }
//public string? PostCode { get; set; }=string.Empty;
public string PostName { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,16 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Rbac.Dtos.Post
{
public class PostGetListOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public bool State { get; set; }
public string PostCode { get; set; } = string.Empty;
public string PostName { get; set; } = string.Empty;
public string Remark { get; set; }
public int OrderNum { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using System;
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
namespace Yi.Furion.Core.Rbac.Dtos.Post
{
public class PostGetOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public bool State { get; set; }
public string PostCode { get; set; } = string.Empty;
public string PostName { get; set; } = string.Empty;
public string Remark { get; set; }
public int OrderNum { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using System;
namespace Yi.Furion.Core.Rbac.Dtos.Post
{
public class PostUpdateInputVo
{
public long Id { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public bool State { get; set; }
public string PostCode { get; set; } = string.Empty;
public string PostName { get; set; } = string.Empty;
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,23 @@
using System.Collections.Generic;
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Dtos.Role
{
/// <summary>
/// Role输入创建对象
/// </summary>
public class RoleCreateInputVo
{
public string RoleName { get; set; }
public string RoleCode { get; set; }
public string Remark { get; set; }
public DataScopeEnum DataScope { get; set; } = DataScopeEnum.ALL;
public bool State { get; set; } = true;
public int OrderNum { get; set; }
public List<long> DeptIds { get; set; }
public List<long> MenuIds { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
using Yi.Framework.Infrastructure.Ddd.Dtos;
namespace Yi.Furion.Core.Rbac.Dtos.Role
{
public class RoleGetListInputVo : PagedAllResultRequestDto
{
public string RoleName { get; set; }
public string RoleCode { get; set; }
public bool? State { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Dtos.Role
{
public class RoleGetListOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public string RoleName { get; set; }
public string RoleCode { get; set; }
public string Remark { get; set; }
public DataScopeEnum DataScope { get; set; } = DataScopeEnum.ALL;
public bool State { get; set; }
public int OrderNum { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Dtos.Role
{
public class RoleGetOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public string RoleName { get; set; }
public string RoleCode { get; set; }
public string Remark { get; set; }
public DataScopeEnum DataScope { get; set; } = DataScopeEnum.ALL;
public bool State { get; set; }
public int OrderNum { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Dtos.Role
{
public class RoleUpdateInputVo
{
public string RoleName { get; set; }
public string RoleCode { get; set; }
public string Remark { get; set; }
public DataScopeEnum DataScope { get; set; } = DataScopeEnum.ALL;
public bool State { get; set; }
public int OrderNum { get; set; }
public List<long> DeptIds { get; set; }
public List<long> MenuIds { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Dtos.User
{
public class ProfileUpdateInputVo
{
public string Name { get; set; }
public int? Age { get; set; }
public string Nick { get; set; }
public string Email { get; set; }
public string Address { get; set; }
public long? Phone { get; set; }
public string Introduction { get; set; }
public string Remark { get; set; }
public SexEnum? Sex { get; set; }
}
}

View File

@@ -0,0 +1,28 @@
using System.Collections.Generic;
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Dtos.User
{
/// <summary>
/// User输入创建对象
/// </summary>
public class UserCreateInputVo
{
public string Name { get; set; }
public int? Age { get; set; }
public string UserName { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public string Icon { get; set; }
public string Nick { get; set; }
public string Email { get; set; }
public string Address { get; set; }
public long? Phone { get; set; }
public string Introduction { get; set; }
public string Remark { get; set; }
public SexEnum Sex { get; set; } = SexEnum.Unknown;
public List<long> RoleIds { get; set; }
public List<long> PostIds { get; set; }
public long? DeptId { get; set; }
public bool State { get; set; } = true;
}
}

View File

@@ -0,0 +1,18 @@
using Yi.Framework.Infrastructure.Ddd.Dtos;
namespace Yi.Furion.Core.Rbac.Dtos.User
{
public class UserGetListInputVo : PagedAllResultRequestDto
{
public string Name { get; set; }
public string UserName { get; set; }
public long? Phone { get; set; }
public bool? State { get; set; }
public long? DeptId { get; set; }
public string Ids { get; set; }
}
}

View File

@@ -0,0 +1,30 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Dtos.User
{
public class UserGetListOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public string Name { get; set; }
public int? Age { get; set; }
public string UserName { get; set; } = string.Empty;
public string Icon { get; set; }
public string Nick { get; set; }
public string Email { get; set; }
public string Ip { get; set; }
public string Address { get; set; }
public long? Phone { get; set; }
public string Introduction { get; set; }
public string Remark { get; set; }
public SexEnum Sex { get; set; } = SexEnum.Unknown;
public long? DeptId { get; set; }
public DateTime CreationTime { get; set; } = DateTime.Now;
public long? CreatorId { get; set; }
public bool State { get; set; }
public string DeptName { get; set; }
}
}

View File

@@ -0,0 +1,35 @@
using Yi.Framework.Infrastructure.Ddd.Dtos.Abstract;
using Yi.Furion.Core.Rbac.Dtos.Dept;
using Yi.Furion.Core.Rbac.Dtos.Post;
using Yi.Furion.Core.Rbac.Dtos.Role;
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Dtos.User
{
public class UserGetOutputDto : IEntityDto<long>
{
public long Id { get; set; }
public string Name { get; set; }
public int? Age { get; set; }
public string UserName { get; set; } = string.Empty;
public string Icon { get; set; }
public string Nick { get; set; }
public string Email { get; set; }
public string Ip { get; set; }
public string Address { get; set; }
public long? Phone { get; set; }
public string Introduction { get; set; }
public string Remark { get; set; }
public SexEnum Sex { get; set; } = SexEnum.Unknown;
public bool State { get; set; }
public DateTime CreationTime { get; set; }
public long DeptId { get; set; }
public DeptGetOutputDto Dept { get; set; }
public List<PostGetListOutputDto> Posts { get; set; }
public List<RoleGetListOutputDto> Roles { get; set; }
}
}

View File

@@ -0,0 +1,28 @@
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Dtos.User
{
public class UserUpdateInputVo
{
public string Name { get; set; }
public int? Age { get; set; }
public string UserName { get; set; }
[AdaptIgnore]
public string Password { get; set; }
public string Icon { get; set; }
public string Nick { get; set; }
public string Email { get; set; }
public string Ip { get; set; }
public string Address { get; set; }
public long? Phone { get; set; }
public string Introduction { get; set; }
public string Remark { get; set; }
public SexEnum? Sex { get; set; }
public long? DeptId { get; set; }
public List<long> PostIds { get; set; }
public List<long> RoleIds { get; set; }
public bool? State { get; set; }
}
}

View File

@@ -0,0 +1,58 @@
using SqlSugar;
using Yi.Framework.Infrastructure.Data.Auditing;
using Yi.Framework.Infrastructure.Data.Entities;
using Yi.Framework.Infrastructure.Ddd.Entities;
namespace Yi.Furion.Core.Rbac.Entities
{
/// <summary>
/// 配置表
/// </summary>
[SugarTable("Config")]
public class ConfigEntity : IEntity<long>, IAuditedObject, IOrderNum, ISoftDelete
{
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
public long Id { get; set; }
/// <summary>
/// 配置名称
///</summary>
[SugarColumn(ColumnName = "ConfigName")]
public string ConfigName { get; set; } = string.Empty;
/// <summary>
/// 配置键
///</summary>
[SugarColumn(ColumnName = "ConfigKey")]
public string ConfigKey { get; set; } = string.Empty;
/// <summary>
/// 配置值
///</summary>
[SugarColumn(ColumnName = "ConfigValue")]
public string ConfigValue { get; set; } = string.Empty;
/// <summary>
/// 配置类别
///</summary>
[SugarColumn(ColumnName = "ConfigType")]
public string ConfigType { get; set; }
/// <summary>
/// 排序字段
///</summary>
[SugarColumn(ColumnName = "OrderNum")]
public int OrderNum { get; set; }
/// <summary>
/// 描述
///</summary>
[SugarColumn(ColumnName = "Remark")]
public string Remark { get; set; }
public bool IsDeleted { get; set; }
public DateTime CreationTime { get; set; }
public long? CreatorId { get; set; }
public long? LastModifierId { get; set; }
public DateTime? LastModificationTime { get; set; }
}
}

View File

@@ -7,7 +7,7 @@ using Yi.Framework.Infrastructure.Data.Entities;
using Yi.Framework.Infrastructure.Ddd.Entities;
using Yi.Framework.Infrastructure.Helper;
using Yi.Furion.Core.Rbac.Dtos;
using Yi.Furion.Core.Rbac.EnumClasses;
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Entities
{

View File

@@ -4,7 +4,7 @@ using SqlSugar;
using Yi.Framework.Infrastructure.Data.Auditing;
using Yi.Framework.Infrastructure.Data.Entities;
using Yi.Framework.Infrastructure.Ddd.Entities;
using Yi.Furion.Core.Rbac.EnumClasses;
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Entities
{

View File

@@ -5,7 +5,7 @@ using Yi.Framework.Infrastructure.Data.Auditing;
using Yi.Framework.Infrastructure.Data.Entities;
using Yi.Framework.Infrastructure.Ddd.Entities;
using Yi.Framework.Infrastructure.Helper;
using Yi.Furion.Core.Rbac.EnumClasses;
using Yi.Furion.Core.Rbac.Enums;
namespace Yi.Furion.Core.Rbac.Entities
{

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Furion.Core.Rbac.EnumClasses
namespace Yi.Furion.Core.Rbac.Enums
{
public enum DataScopeEnum
{

Some files were not shown because too many files have changed in this diff Show More