V6Drawing.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System.Collections.Generic;
  2. namespace Comal.Classes
  3. {
  4. public class V6DrawingIndexEntry
  5. {
  6. public string FileName { get; set; }
  7. public string FileType { get; set; }
  8. public string NodeName { get; set; }
  9. public string FaceIndex { get; set; }
  10. public string CutDescriptor { get; set; }
  11. public string CutLocation { get; set; }
  12. }
  13. public class V6DrawingIndex
  14. {
  15. public V6DrawingIndexEntry[] Files { get; set; } = new V6DrawingIndexEntry[] { };
  16. public string? Version { get; set; }
  17. }
  18. public class V6Drawing
  19. {
  20. public string FileName { get; set; }
  21. public byte[] Data { get; set; }
  22. }
  23. public class V6Drawings : V6Object
  24. {
  25. public byte[] Drawings { get; set; }
  26. public override void ValidateQuery(string sql, List<string> errors)
  27. {
  28. ValidateField(sql, nameof(Drawings), errors);
  29. }
  30. public static string SQL =
  31. "select \n" +
  32. $" id.drawings as {nameof(Drawings)} \n" +
  33. "from \n" +
  34. " quote_item_drawings id \n" +
  35. "left outer join \n" +
  36. " quote_item qi on qi.quote_item_id = id.quote_item_id \n" +
  37. "left outer join \n" +
  38. " quote q on q.quote_id = qi.quote_id \n" +
  39. "where \n" +
  40. " 1=1";
  41. }
  42. }