ApiInfo.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. using Mapster;
  2. using Vo;
  3. namespace Model
  4. {
  5. /// <summary>
  6. /// api接口 api_info
  7. /// </summary>
  8. [SugarTable("api_info", "api接口")]
  9. [Tenant("0")]
  10. public class ApiInfo
  11. {
  12. /// <summary>
  13. /// 分组
  14. /// </summary>
  15. [SugarColumn(ColumnDescription = "分组", ColumnName = "group_id")]
  16. public int groupId { get; set; }
  17. /// <summary>
  18. /// 接口名称
  19. /// </summary>
  20. [SugarColumn(ColumnDescription = "接口名称", Length = 50, ColumnName = "api_name")]
  21. public string apiName { get; set; }
  22. /// <summary>
  23. /// 接口关键字
  24. /// </summary>
  25. [SugarColumn(ColumnDescription = "接口关键字", Length = 50, ColumnName = "api_key")]
  26. public string apiKey { get; set; }
  27. /// <summary>
  28. /// 接口主机头
  29. /// </summary>
  30. [SugarColumn(ColumnDescription = "接口主机头", Length = 50, ColumnName = "api_host")]
  31. public string apiHost { get; set; }
  32. /// <summary>
  33. /// 接口端口号
  34. /// </summary>
  35. [SugarColumn(ColumnDescription = "接口端口号", ColumnName = "api_port")]
  36. public int apiPort { get; set; }
  37. /// <summary>
  38. /// 接口路由
  39. /// </summary>
  40. [SugarColumn(ColumnDescription = "接口路由", Length = 200, ColumnName = "api_router")]
  41. public string apiRouter { get; set; }
  42. /// <summary>
  43. /// 接口请求方式
  44. /// </summary>
  45. [SugarColumn(ColumnDescription = "接口请求方式", Length = 10, ColumnName = "api_method")]
  46. public string apiMethod { get; set; }
  47. /// <summary>
  48. /// ID
  49. /// </summary>
  50. [SugarColumn(ColumnDescription = "ID", IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]
  51. public int id { get; set; }
  52. /// <summary>
  53. /// 状态
  54. /// </summary>
  55. [SugarColumn(ColumnDescription = "状态", ColumnName = "status")]
  56. public int status { get; set; }
  57. /// <summary>
  58. /// 排序
  59. /// </summary>
  60. [SugarColumn(ColumnDescription = "排序", ColumnName = "sort")]
  61. public int sort { get; set; }
  62. /// <summary>
  63. /// 版本号
  64. /// </summary>
  65. [SugarColumn(ColumnDescription = "版本号", ColumnName = "version")]
  66. public int version { get; set; }
  67. /// <summary>
  68. /// 创建时间
  69. /// </summary>
  70. [SugarColumn(ColumnDescription = "创建时间", ColumnName = "create_date")]
  71. public DateTime? createDate { get; set; }
  72. /// <summary>
  73. /// 更新时间
  74. /// </summary>
  75. [SugarColumn(ColumnDescription = "更新时间", ColumnName = "update_date")]
  76. public DateTime? updateDate { get; set; }
  77. /// <summary>
  78. /// api接口分组
  79. /// <summary>
  80. [SugarColumn(IsIgnore = true)]
  81. [Navigate(NavigateType.OneToOne, nameof(groupId))]
  82. public ApiGroup apiGroupJoin { get; set; }
  83. [SugarColumn(IsIgnore = true)]
  84. public ApiGroupVo apiGroupInfo
  85. {
  86. get
  87. {
  88. return apiGroupJoin.Adapt<ApiGroupVo>();
  89. }
  90. }
  91. }
  92. }