using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Abp.Domain.Entities.Auditing; using WeOnlineApp.Authorization.Users; using WeOnlineApp.Basic; using WeOnlineApp.Configuration; using WeOnlineApp.TrainingCamp; namespace WeOnlineApp.Question { /// /// 问题 /// [Table("Train_QuestionInfos")] public class QuestionInfo : FullAuditedEntity { public const int TitleLength = 500; public const int ContentLength = 1000; /// /// 课程类型 /// [MaxLength(IwbConsts.PrimaryKey)] public string SubjectCategoryNo { get; set; } [ForeignKey("SubjectCategoryNo")] public SubjectCategoryInfo SubjectCategory { get; set; } /// /// 课程类型 /// [MaxLength(IwbConsts.PrimaryKey)] public string CampNo { get; set; } [ForeignKey("CampNo")] public CampInfo Camp { get; set; } [NotMapped] public string CampName => Camp?.Name ?? ""; /// /// 问题标题 /// [MaxLength(TitleLength)] public string Title { get; set; } /// /// 问题内容 /// [MaxLength(ContentLength)] public string ContentInfo { get; set; } /// /// 问题状态 /// public int QuestionState { get; set; } /// /// 解答时间 /// public DateTime? AnswerDateTime { get; set; } public string AnswerNo { get; set; } public virtual ICollection AnswerInfos { get; set; } public virtual ICollection Favorites { get; set; } /// /// 备注 /// [MaxLength(RemarkLength)] public string Remark { get; set; } public const int RemarkLength = 500; } }