SceneDto.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using System;
  2. using System.Collections.Generic;
  3. using Newtonsoft.Json;
  4. using WeEngine.ModelInfo;
  5. namespace WeApp.Configuration.Cache
  6. {
  7. public class SceneDto : SceneModel
  8. {
  9. public List<CampAttachDto> Attaches { get; set; }
  10. public bool HasEnd { get; set; }
  11. public new string Description => base.Description;
  12. [JsonIgnore]
  13. public new string _description => base._description;
  14. public new List<GuideModel> GuideInfos { get; set; }
  15. /// <summary>
  16. /// 系统得分
  17. /// </summary>
  18. public decimal? SystemScore { get; set; }
  19. /// <summary>
  20. /// 满分
  21. /// </summary>
  22. public decimal? FullScore { get; set; }
  23. /// <summary>
  24. /// 得分百分比
  25. /// </summary>
  26. public decimal ScorePer => GetPer();
  27. public decimal GetPer()
  28. {
  29. if (SystemScore == null || FullScore == null)
  30. {
  31. return 0;
  32. }
  33. return Math.Round(((decimal)SystemScore / (decimal)FullScore) * 100, 2);
  34. }
  35. }
  36. public class ScenePathDto
  37. {
  38. public ScenePathDto()
  39. {
  40. PathList = new List<string>();
  41. }
  42. public bool hasChange { get; set; }
  43. public List<string> PathList { get; set; }
  44. }
  45. }