Advertisement
ko7tya

Untitled

May 24th, 2022
1,451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 1.52 KB | None | 0 0
  1. import Foundation
  2.  
  3. // MARK: - LiveEvent
  4. struct LiveEvent: Codable {
  5.     let id: Int
  6.     let name: String
  7.     let preview: String
  8.     let liveEventDescription: String
  9.     let scheduledAt: Date
  10.     let approximateDuration: Int
  11.     let promoteOn: [String]
  12.     let hosts: [Host]
  13.     let playbackURL: String
  14.  
  15.     enum CodingKeys: String, CodingKey {
  16.         case id, name, preview
  17.         case liveEventDescription = "description"
  18.         case scheduledAt = "scheduled_at"
  19.         case approximateDuration = "approximate_duration"
  20.         case promoteOn = "promote_on"
  21.         case hosts
  22.         case playbackURL = "playback_url"
  23.     }
  24. }
  25.  
  26. // MARK: - Host
  27. struct Host: Codable {
  28.     let name, title: String
  29.     let photo: String
  30.     let licensesAndCertifications: [LicensesAndCertification]
  31.     let career: [Career]
  32.     let education: [Education]
  33.  
  34.     enum CodingKeys: String, CodingKey {
  35.         case name, title, photo
  36.         case licensesAndCertifications = "licenses_and_certifications"
  37.         case career, education
  38.     }
  39. }
  40.  
  41. // MARK: - Career
  42. struct Career: Codable {
  43.     let company, localtion: String
  44.     let timeline: [Timeline]
  45. }
  46.  
  47. // MARK: - Timeline
  48. struct Timeline: Codable {
  49.     let start, position: String
  50.     let end: String?
  51. }
  52.  
  53. // MARK: - Education
  54. struct Education: Codable {
  55.     let start, end, place, specialization: String
  56.     let location: String
  57. }
  58.  
  59. // MARK: - LicensesAndCertification
  60. struct LicensesAndCertification: Codable {
  61.     let issued, name, organization: String
  62. }
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement