Models.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 Func<Size, byte[]> ImageSource { get; set; }
  40. public Location Location { get; set; }
  41. }
  42. public class ReportSectionPhotos : ReportSectionElement
  43. {
  44. public List<byte[]> Photos { get; set; }
  45. }
  46. public class ReportPhoto
  47. {
  48. public byte[] PhotoData { get; set; }
  49. public Func<Size, byte[]> MapDetailsSource { get; set; }
  50. public Func<Size, byte[]> MapContextSource { get; set; }
  51. public Location Location { get; set; }
  52. public DateTime? Date { get; set; }
  53. public string Comments { get; set; }
  54. }
  55. }