Models.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using System;
  2. using System.Collections.Generic;
  3. namespace QuestPDF.ReportSample
  4. {
  5. public class ReportModel
  6. {
  7. public string Title { get; set; }
  8. public byte[] LogoData { get; set; }
  9. public List<ReportHeaderField> HeaderFields { get; set; }
  10. public List<ReportSection> Sections { get; set; }
  11. public List<ReportPhoto> Photos { get; set; }
  12. }
  13. public class ReportHeaderField
  14. {
  15. public string Label { get; set; }
  16. public string Value { get; set; }
  17. }
  18. public class Location
  19. {
  20. public double Longitude { get; set; }
  21. public double Latitude { get; set; }
  22. }
  23. public class ReportSection
  24. {
  25. public string Title { get; set; }
  26. public List<ReportSectionElement> Parts { get; set; }
  27. }
  28. public abstract class ReportSectionElement
  29. {
  30. public string Label { get; set; }
  31. }
  32. public class ReportSectionText : ReportSectionElement
  33. {
  34. public string Text { get; set; }
  35. }
  36. public class ReportSectionMap : ReportSectionElement
  37. {
  38. public Location Location { get; set; }
  39. }
  40. public class ReportSectionPhotos : ReportSectionElement
  41. {
  42. public int PhotoCount { get; set; }
  43. }
  44. public class ReportPhoto
  45. {
  46. public Location Location { get; set; }
  47. public DateTime? Date { get; set; }
  48. public string Comments { get; set; }
  49. }
  50. }