feat: 新增签到功能

This commit is contained in:
橙子
2024-01-11 22:06:15 +08:00
parent 5a65a2e49f
commit c80ecf958c
10 changed files with 125 additions and 8 deletions

View File

@@ -13,6 +13,7 @@ namespace Yi.Framework.Bbs.Domain.Entities
/// 评论表
/// </summary>
[SugarTable("BbsUserExtraInfo")]
[SugarIndex($"index_{nameof(UserId)}", nameof(UserId), OrderByType.Asc)]
public class BbsUserExtraInfoEntity : Entity<Guid>
{
public BbsUserExtraInfoEntity() { }

View File

@@ -5,6 +5,8 @@ using Volo.Abp.Domain.Entities;
namespace Yi.Framework.Bbs.Domain.Entities.Forum
{
[SugarTable("Agree")]
[SugarIndex($"index_{nameof(CreatorId)}_{nameof(DiscussId)}", nameof(CreatorId), OrderByType.Asc,
nameof(DiscussId), OrderByType.Asc)]
public class AgreeEntity : Entity<Guid>, ICreationAuditedObject
{
public AgreeEntity()

View File

@@ -6,6 +6,9 @@ using Volo.Abp.Domain.Entities;
namespace Yi.Framework.Bbs.Domain.Entities.Forum
{
[SugarTable("Article")]
[SugarIndex($"index_{nameof(Name)}", nameof(Name), OrderByType.Asc)]
[SugarIndex($"index_{nameof(ParentId)}", nameof(ParentId), OrderByType.Asc)]
[SugarIndex($"index_{nameof(DiscussId)}", nameof(DiscussId), OrderByType.Asc)]
public class ArticleEntity : Entity<Guid>, ISoftDelete, IAuditedObject
{
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]

View File

@@ -11,6 +11,8 @@ namespace Yi.Framework.Bbs.Domain.Entities.Forum
/// 评论表
/// </summary>
[SugarTable("Comment")]
[SugarIndex($"index_{nameof(DiscussId)}", nameof(DiscussId), OrderByType.Asc)]
[SugarIndex($"index_{nameof(ParentId)}", nameof(ParentId), OrderByType.Asc)]
public class CommentEntity : Entity<Guid>, ISoftDelete, IAuditedObject
{
/// <summary>

View File

@@ -7,6 +7,9 @@ using Yi.Framework.Bbs.Domain.Shared.Enums;
namespace Yi.Framework.Bbs.Domain.Entities.Forum
{
[SugarTable("Discuss")]
[SugarIndex($"index_{nameof(Title)}", nameof(Title), OrderByType.Asc)]
[SugarIndex($"index_{nameof(PlateId)}", nameof(PlateId), OrderByType.Asc)]
[SugarIndex($"index_{nameof(CreationTime)}", nameof(CreationTime), OrderByType.Desc)]
public class DiscussEntity : Entity<Guid>, ISoftDelete, IAuditedObject
{
public DiscussEntity()

View File

@@ -13,6 +13,8 @@ namespace Yi.Framework.Bbs.Domain.Entities.Integral
/// 签到表
/// </summary>
[SugarTable("SignIn")]
[SugarIndex($"index_{nameof(CreatorId)}", nameof(CreatorId), OrderByType.Asc)]
public class SignInEntity : Entity<Guid>, ICreationAuditedObject
{
@@ -27,5 +29,10 @@ namespace Yi.Framework.Bbs.Domain.Entities.Integral
//签到用户
public Guid? CreatorId { get; set; }
/// <summary>
/// 连续签到次数
/// </summary>
public int ContinuousNumber { get; set; } = 1;
}
}