using System; using System.Collections.Generic; using System.Linq; using System.Text.Json.Serialization; using SqlSugar; using Yi.Framework.Model.Base; using Yi.Framework.Model.RABC.Entitys; namespace Yi.Framework.Model.BBS.Entitys { /// /// 文章表 /// [SugarTable("Article")] public partial class ArticleEntity : IBaseModelEntity { public ArticleEntity() { CreateTime = DateTime.Now; AgreeNum = 0; } [JsonConverter(typeof(ValueToStringConverter))] [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)] public long Id { get; set; } /// /// 文章标题 /// [SugarColumn(ColumnName = "Title")] public string? Title { get; set; } /// /// 文章内容 /// [SugarColumn(ColumnName = "Content")] public string? Content { get; set; } /// /// 用户id /// [SugarColumn(ColumnName = "UserId")] public long? UserId { get; set; } /// /// 创建者 /// [SugarColumn(ColumnName = "CreateUser")] public long? CreateUser { get; set; } /// /// 创建时间 /// [SugarColumn(ColumnName = "CreateTime")] public DateTime? CreateTime { get; set; } /// /// 修改者 /// [SugarColumn(ColumnName = "ModifyUser")] public long? ModifyUser { get; set; } /// /// 修改时间 /// [SugarColumn(ColumnName = "ModifyTime")] public DateTime? ModifyTime { get; set; } /// /// 是否删除 /// [SugarColumn(ColumnName = "IsDeleted")] public bool? IsDeleted { get; set; } /// /// 租户Id /// [SugarColumn(ColumnName = "TenantId")] public long? TenantId { get; set; } /// /// 排序字段 /// [SugarColumn(ColumnName = "OrderNum")] public int? OrderNum { get; set; } /// /// 描述 /// [SugarColumn(ColumnName = "Remark")] public string? Remark { get; set; } /// /// 图片列表 /// [SugarColumn(ColumnName = "Images", IsJson = true)] public List? Images { get; set; } /// /// 点赞数量 /// [SugarColumn(ColumnName = "AgreeNum")] public int AgreeNum { get; set; } [Navigate(NavigateType.OneToOne, nameof(UserId))] public UserEntity? User { get; set; } } }