2023-12-11 09:55:12 +08:00
|
|
|
|
using SqlSugar;
|
|
|
|
|
|
using Volo.Abp;
|
|
|
|
|
|
using Volo.Abp.Auditing;
|
|
|
|
|
|
using Volo.Abp.Domain.Entities;
|
|
|
|
|
|
using Yi.Framework.Bbs.Domain.Shared.Enums;
|
|
|
|
|
|
|
2024-01-11 18:51:53 +08:00
|
|
|
|
namespace Yi.Framework.Bbs.Domain.Entities.Forum
|
2023-04-15 22:44:33 +08:00
|
|
|
|
{
|
|
|
|
|
|
[SugarTable("Discuss")]
|
2024-01-11 22:06:15 +08:00
|
|
|
|
[SugarIndex($"index_{nameof(Title)}", nameof(Title), OrderByType.Asc)]
|
|
|
|
|
|
[SugarIndex($"index_{nameof(CreationTime)}", nameof(CreationTime), OrderByType.Desc)]
|
2025-01-18 01:07:38 +08:00
|
|
|
|
[SugarIndex($"index_{nameof(IsDeleted)}_{nameof(PlateId)}_{nameof(CreatorId)}",
|
|
|
|
|
|
nameof(IsDeleted), OrderByType.Asc,
|
|
|
|
|
|
nameof(PlateId), OrderByType.Asc,
|
|
|
|
|
|
nameof(CreatorId), OrderByType.Asc
|
|
|
|
|
|
)]
|
2024-05-22 14:35:08 +08:00
|
|
|
|
public class DiscussAggregateRoot : AggregateRoot<Guid>, ISoftDelete, IAuditedObject
|
2023-04-15 22:44:33 +08:00
|
|
|
|
{
|
2024-05-22 14:35:08 +08:00
|
|
|
|
public DiscussAggregateRoot()
|
2023-04-15 22:44:33 +08:00
|
|
|
|
{
|
|
|
|
|
|
}
|
2024-05-22 14:35:08 +08:00
|
|
|
|
public DiscussAggregateRoot(Guid plateId)
|
2023-04-15 22:44:33 +08:00
|
|
|
|
{
|
|
|
|
|
|
PlateId = plateId;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-11 09:55:12 +08:00
|
|
|
|
[SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
|
|
|
|
|
|
public override Guid Id { get; protected set; }
|
2023-04-20 23:08:21 +08:00
|
|
|
|
public string? Title { get; set; }
|
|
|
|
|
|
public string? Types { get; set; }
|
|
|
|
|
|
public string? Introduction { get; set; }
|
2023-04-15 22:44:33 +08:00
|
|
|
|
public int AgreeNum { get; set; }
|
|
|
|
|
|
public int SeeNum { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 封面
|
|
|
|
|
|
/// </summary>
|
2023-04-20 23:08:21 +08:00
|
|
|
|
public string? Cover { get; set; }
|
2023-04-15 22:44:33 +08:00
|
|
|
|
|
2023-12-11 09:55:12 +08:00
|
|
|
|
[SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
2023-04-15 22:44:33 +08:00
|
|
|
|
public string Content { get; set; }
|
|
|
|
|
|
|
2023-04-20 23:08:21 +08:00
|
|
|
|
public string? Color { get; set; }
|
2023-04-15 22:44:33 +08:00
|
|
|
|
|
|
|
|
|
|
public bool IsDeleted { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
//是否置顶,默认false
|
|
|
|
|
|
public bool IsTop { get; set; }
|
|
|
|
|
|
|
2023-12-18 23:15:13 +08:00
|
|
|
|
public int OrderNum { get; set; } = 0;
|
|
|
|
|
|
|
2023-04-15 22:44:33 +08:00
|
|
|
|
|
|
|
|
|
|
public DiscussPermissionTypeEnum PermissionType { get; set; }
|
|
|
|
|
|
|
2023-12-11 09:55:12 +08:00
|
|
|
|
public Guid PlateId { get; set; }
|
2023-04-15 22:44:33 +08:00
|
|
|
|
public DateTime CreationTime { get; set; }
|
|
|
|
|
|
|
2023-12-11 09:55:12 +08:00
|
|
|
|
public Guid? CreatorId { get; set; }
|
2023-04-15 22:44:33 +08:00
|
|
|
|
|
2023-12-11 09:55:12 +08:00
|
|
|
|
public Guid? LastModifierId { get; set; }
|
2023-04-15 22:44:33 +08:00
|
|
|
|
|
|
|
|
|
|
public DateTime? LastModificationTime { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 当PermissionType为部分用户时候,以下列表中的用户+创建者 代表拥有权限
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[SugarColumn(IsJson = true)]//使用json处理
|
2023-12-11 09:55:12 +08:00
|
|
|
|
public List<Guid>? PermissionUserIds { get; set; }
|
2023-12-19 13:05:03 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否禁止评论创建功能
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool IsDisableCreateComment { get; set; }
|
2023-04-15 22:44:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|