QuestionAnswerInfo.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System.ComponentModel.DataAnnotations;
  2. using System.ComponentModel.DataAnnotations.Schema;
  3. using Abp.Domain.Entities.Auditing;
  4. using WeOnlineApp.Authorization.Users;
  5. using WeOnlineApp.Configuration;
  6. namespace WeOnlineApp.Question
  7. {
  8. /// <summary>
  9. /// 问题
  10. /// </summary>
  11. [Table("Train_QuestionAnswerInfos")]
  12. public class QuestionAnswerInfo : AuditedEntity<string, User>
  13. {
  14. public const int ContentLength = 1000;
  15. public string AnswerNo { get; set; }
  16. [ForeignKey("AnswerNo")]
  17. public QuestionAnswerInfo Parent { get; set; }
  18. [MaxLength(IwbConsts.PrimaryKey)]
  19. public string QuestionNo { get; set; }
  20. [ForeignKey("QuestionNo")]
  21. public QuestionInfo QuestionInfo { get; set; }
  22. /// <summary>
  23. /// 答案状态
  24. /// </summary>
  25. public int AnswerState { get; set; }
  26. /// <summary>
  27. /// 回答内容
  28. /// </summary>
  29. [MaxLength(ContentLength)]
  30. public string ContentInfo { get; set; }
  31. /// <summary>
  32. /// 备注
  33. /// </summary>
  34. [MaxLength(RemarkLength)]
  35. public string Remark { get; set; }
  36. public const int RemarkLength = 500;
  37. }
  38. }