TracksDTO.cs 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. }
  52. [Table("track_request_logs")]
  53. public class TrackRequestLogDTO
  54. {
  55. [Key]
  56. public long id { get; set; }
  57. public int track_id { get; set; } = 0;
  58. public int account_id { get; set; } = 0;
  59. public string event_type { get; set; } = string.Empty;
  60. public string platform { get; set; } = string.Empty;
  61. public string typename { get; set; } = string.Empty;
  62. public string scene { get; set; } = string.Empty;
  63. public string unique_id { get; set; } = string.Empty;
  64. public string ip { get; set; } = string.Empty;
  65. public string user_agent { get; set; } = string.Empty;
  66. public string referer { get; set; } = string.Empty;
  67. public DateTime create_time { get; set; } = DateTime.Now;
  68. }
  69. }