using System; using dodohold.core; namespace molilian.core { [Table("track_links")] public class TrackLinkDTO { [Key] public int id { get; set; } public string event_type { get; set; } = string.Empty; public string platform { get; set; } = string.Empty; public string typename { get; set; } = string.Empty; public string scene { get; set; } = string.Empty; public string unique_id { get; set; } = string.Empty; public string path { get; set; } = string.Empty; public string description { get; set; } = string.Empty; public DateTime create_time { get; set; } = DateTime.Now; public DateTime update_time { get; set; } = DateTime.Now; } [Table("track_daily_report")] public class TrackDailyReportDTO { [Key] public int id { get; set; } public DateTime report_date { get; set; } = DateTime.Now.Date; public string event_type { get; set; } = string.Empty; public string platform { get; set; } = string.Empty; public string typename { get; set; } = string.Empty; public string scene { get; set; } = string.Empty; public string unique_id { get; set; } = string.Empty; public int track_link_id { get; set; } = 0; public int account_id { get; set; } = 0; public int event_count { get; set; } = 0; public DateTime create_time { get; set; } = DateTime.Now; public DateTime update_time { get; set; } = DateTime.Now; } public class TrackHourlyReportDTO { public int track_link_id { get; set; } = 0; public string event_type { get; set; } = string.Empty; public string platform { get; set; } = string.Empty; public string typename { get; set; } = string.Empty; public string scene { get; set; } = string.Empty; public string unique_id { get; set; } = string.Empty; public int account_id { get; set; } = 0; public DateTime report_date { get; set; } = DateTime.Now.Date; public int hour { get; set; } = 0; public string hour_label => $"{hour:00}:00"; public int event_count { get; set; } = 0; public int call_count { get; set; } = 0; public int success_count { get; set; } = 0; } public class TrackParseMetricReportDTO { public DateTime report_date { get; set; } = DateTime.Now.Date; public string platform { get; set; } = string.Empty; public string typename { get; set; } = string.Empty; public string risk_strategy { get; set; } = string.Empty; public int launch_scene { get; set; } = -1; public int account_id { get; set; } = 0; public int request_count { get; set; } = 0; public int call_count { get; set; } = 0; public int success_count { get; set; } = 0; } public class TrackParseMetricHourlyDTO : TrackParseMetricReportDTO { public int hour { get; set; } = 0; public string hour_label => $"{hour:00}:00"; } public class TrackParseMetricReportResult { public List list { get; set; } = []; public int count { get; set; } = 0; } public class TrackParseMetricBackfillResult { public string report_date { get; set; } = string.Empty; public int mysql_rows { get; set; } = 0; public int redis_dimensions { get; set; } = 0; public int redis_cleared_keys { get; set; } = 0; public List details { get; set; } = []; } [Table("track_request_logs")] public class TrackRequestLogDTO { [Key] public long id { get; set; } public int track_id { get; set; } = 0; public int account_id { get; set; } = 0; public string event_type { get; set; } = string.Empty; public string platform { get; set; } = string.Empty; public string typename { get; set; } = string.Empty; public string scene { get; set; } = string.Empty; public string unique_id { get; set; } = string.Empty; public string ip { get; set; } = string.Empty; public string user_agent { get; set; } = string.Empty; public string referer { get; set; } = string.Empty; public DateTime create_time { get; set; } = DateTime.Now; } }