TracksDTO.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. using System;
  2. using dodohold.core;
  3. namespace molilian.core
  4. {
  5. [Table("track_links")]
  6. public class TrackLinkDTO
  7. {
  8. [Key]
  9. public int id { get; set; }
  10. public string event_type { get; set; } = string.Empty;
  11. public string platform { get; set; } = string.Empty;
  12. public string typename { get; set; } = string.Empty;
  13. public string scene { get; set; } = string.Empty;
  14. public string unique_id { get; set; } = string.Empty;
  15. public string path { get; set; } = string.Empty;
  16. public string description { get; set; } = string.Empty;
  17. public DateTime create_time { get; set; } = DateTime.Now;
  18. public DateTime update_time { get; set; } = DateTime.Now;
  19. }
  20. [Table("track_daily_report")]
  21. public class TrackDailyReportDTO
  22. {
  23. [Key]
  24. public int id { get; set; }
  25. public DateTime report_date { get; set; } = DateTime.Now.Date;
  26. public string event_type { get; set; } = string.Empty;
  27. public string platform { get; set; } = string.Empty;
  28. public string typename { get; set; } = string.Empty;
  29. public string scene { get; set; } = string.Empty;
  30. public string unique_id { get; set; } = string.Empty;
  31. public int track_link_id { get; set; } = 0;
  32. public int account_id { get; set; } = 0;
  33. public int event_count { get; set; } = 0;
  34. public DateTime create_time { get; set; } = DateTime.Now;
  35. public DateTime update_time { get; set; } = DateTime.Now;
  36. }
  37. public class TrackHourlyReportDTO
  38. {
  39. public int track_link_id { get; set; } = 0;
  40. public string event_type { get; set; } = string.Empty;
  41. public string platform { get; set; } = string.Empty;
  42. public string typename { get; set; } = string.Empty;
  43. public string scene { get; set; } = string.Empty;
  44. public string unique_id { get; set; } = string.Empty;
  45. public int account_id { get; set; } = 0;
  46. public DateTime report_date { get; set; } = DateTime.Now.Date;
  47. public int hour { get; set; } = 0;
  48. public string hour_label => $"{hour:00}:00";
  49. public int event_count { get; set; } = 0;
  50. public int call_count { get; set; } = 0;
  51. public int success_count { get; set; } = 0;
  52. }
  53. public class TrackParseMetricReportDTO
  54. {
  55. public DateTime report_date { get; set; } = DateTime.Now.Date;
  56. public string platform { get; set; } = string.Empty;
  57. public string typename { get; set; } = string.Empty;
  58. public string risk_strategy { get; set; } = string.Empty;
  59. public int launch_scene { get; set; } = -1;
  60. public int account_id { get; set; } = 0;
  61. public int request_count { get; set; } = 0;
  62. public int call_count { get; set; } = 0;
  63. public int success_count { get; set; } = 0;
  64. }
  65. public class TrackParseMetricHourlyDTO : TrackParseMetricReportDTO
  66. {
  67. public int hour { get; set; } = 0;
  68. public string hour_label => $"{hour:00}:00";
  69. }
  70. public class TrackParseMetricReportResult
  71. {
  72. public List<TrackParseMetricReportDTO> list { get; set; } = [];
  73. public int count { get; set; } = 0;
  74. }
  75. public class TrackParseMetricBackfillResult
  76. {
  77. public string report_date { get; set; } = string.Empty;
  78. public int mysql_rows { get; set; } = 0;
  79. public int redis_dimensions { get; set; } = 0;
  80. public int redis_cleared_keys { get; set; } = 0;
  81. public List<object> details { get; set; } = [];
  82. }
  83. [Table("track_request_logs")]
  84. public class TrackRequestLogDTO
  85. {
  86. [Key]
  87. public long id { get; set; }
  88. public int track_id { get; set; } = 0;
  89. public int account_id { get; set; } = 0;
  90. public string event_type { get; set; } = string.Empty;
  91. public string platform { get; set; } = string.Empty;
  92. public string typename { get; set; } = string.Empty;
  93. public string scene { get; set; } = string.Empty;
  94. public string unique_id { get; set; } = string.Empty;
  95. public string ip { get; set; } = string.Empty;
  96. public string user_agent { get; set; } = string.Empty;
  97. public string referer { get; set; } = string.Empty;
  98. public DateTime create_time { get; set; } = DateTime.Now;
  99. }
  100. }