Без опису

DashboardModels.swift 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //
  2. // DashboardModels.swift
  3. // App for Indeed
  4. //
  5. import Foundation
  6. struct SidebarItem {
  7. let title: String
  8. let systemImage: String
  9. let badge: String?
  10. }
  11. struct StatCard {
  12. let title: String
  13. let value: String
  14. let trend: String
  15. }
  16. struct JobRecommendation {
  17. let title: String
  18. let company: String
  19. let location: String
  20. let matchRate: String
  21. let postedAgo: String
  22. }
  23. struct InsightItem {
  24. let title: String
  25. let description: String
  26. let systemImage: String
  27. }
  28. struct DashboardData {
  29. let greetingName: String
  30. let sidebarItems: [SidebarItem]
  31. let stats: [StatCard]
  32. let recommendations: [JobRecommendation]
  33. let insights: [InsightItem]
  34. }
  35. protocol DashboardDataProviding {
  36. func loadDashboardData() -> DashboardData
  37. }
  38. final class MockDashboardDataProvider: DashboardDataProviding {
  39. func loadDashboardData() -> DashboardData {
  40. DashboardData(
  41. greetingName: "Olivia",
  42. sidebarItems: [
  43. SidebarItem(title: "Overview", systemImage: "house.fill", badge: nil),
  44. SidebarItem(title: "AI Job Search", systemImage: "wand.and.stars", badge: "New"),
  45. SidebarItem(title: "My Jobs", systemImage: "bookmark", badge: nil),
  46. SidebarItem(title: "Saved Jobs", systemImage: "heart", badge: nil),
  47. SidebarItem(title: "Applications", systemImage: "doc.text", badge: nil),
  48. SidebarItem(title: "Profile", systemImage: "person", badge: nil),
  49. SidebarItem(title: "Settings", systemImage: "gearshape", badge: nil)
  50. ],
  51. stats: [
  52. StatCard(title: "Jobs Found", value: "128", trend: "+24 this week"),
  53. StatCard(title: "Saved Jobs", value: "32", trend: "+6 this week"),
  54. StatCard(title: "Applications", value: "14", trend: "+3 this week"),
  55. StatCard(title: "Interviews", value: "5", trend: "Upcoming")
  56. ],
  57. recommendations: [
  58. JobRecommendation(title: "Senior Product Designer", company: "Dropbox", location: "San Francisco, CA", matchRate: "95% Match", postedAgo: "2h ago"),
  59. JobRecommendation(title: "UX Researcher", company: "Airbnb", location: "Remote", matchRate: "90% Match", postedAgo: "4h ago"),
  60. JobRecommendation(title: "Product Manager", company: "Stripe", location: "New York, NY", matchRate: "88% Match", postedAgo: "6h ago")
  61. ],
  62. insights: [
  63. InsightItem(title: "High Demand", description: "Product designer roles are in high demand right now.", systemImage: "chart.line.uptrend.xyaxis"),
  64. InsightItem(title: "Improve Your Profile", description: "Add more skills to increase your match rate.", systemImage: "person.crop.circle.badge.checkmark"),
  65. InsightItem(title: "New Opportunities", description: "24 new jobs match your profile this week.", systemImage: "briefcase.fill")
  66. ]
  67. )
  68. }
  69. }