Models.cs 1.4 KB

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