GenerateDto.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. using System.Collections.Generic;
  2. using ZR.Model.System.Generate;
  3. namespace ZR.CodeGenerator.Model
  4. {
  5. public class GenerateDto
  6. {
  7. /// <summary>
  8. /// vue版本
  9. /// </summary>
  10. public int VueVersion { get; set; }
  11. public long TableId { get; set; }
  12. /// <summary>
  13. /// 是否预览代码
  14. /// </summary>
  15. public bool IsPreview { get; set; }
  16. /// <summary>
  17. /// 生成代码的数据库类型 0、mysql 1、sqlserver
  18. /// </summary>
  19. public int DbType { get; set; }
  20. /// <summary>
  21. /// 生成的按钮功能
  22. /// </summary>
  23. public int[] CheckedBtn { get; set; } = System.Array.Empty<int>();
  24. public GenTable GenTable { get; set; }
  25. public CodeGenerateOption GenOptions { get; set; }
  26. #region 存储路径
  27. /// <summary>
  28. /// 代码模板预览存储路径存放
  29. /// </summary>
  30. public List<GenCode> GenCodes { get; set; } = new List<GenCode>();
  31. /// <summary>
  32. /// 代码生成路径
  33. /// </summary>
  34. public string GenCodePath { get; set; } = string.Empty;
  35. /// <summary>
  36. /// 代码生成压缩包路径
  37. /// </summary>
  38. public string ZipPath { get; set; }
  39. /// <summary>
  40. /// 代码生成压缩包名称
  41. /// </summary>
  42. public string ZipFileName { get; set; }
  43. /// <summary>
  44. /// 生成代码方式(0zip压缩包 1自定义路径)
  45. /// </summary>
  46. public string GenType { get; set; }
  47. public string GenPath { get; set; } = "";
  48. /// <summary>
  49. /// vue代码路径
  50. /// </summary>
  51. public string VueParentPath { get; set; }
  52. #endregion
  53. }
  54. public class GenCode
  55. {
  56. public int Type { get; set; }
  57. public string Title { get; set; }
  58. public string Path { get; set; }
  59. public string Content { get; set; }
  60. public GenCode(int type, string title, string path, string content)
  61. {
  62. Type = type;
  63. Title = title;
  64. Path = path;
  65. Content = content;
  66. }
  67. }
  68. }