Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 1.20 KB | None | 0 0
  1. // MARK: - GetDriverShiftsRequestable
  2. struct GetDriverShiftsRequestable: Codable {
  3.     let nextDeliveryTime, nextOpeningTime: NextTime
  4.     let vacation: Vacation
  5.     let deliveryTimeList, takeawayTimeList: [String]
  6. }
  7.  
  8. // MARK: - NextTime
  9. struct NextTime: Codable {
  10.     let dayOfWeek: Int
  11.     let openHourFrom, openHourTo: String
  12.     let isOutsideOperatingHours, isClosed, isCurrentDay, isPreOrder: Bool
  13.     let canOrder: Bool
  14.     let openingState: String
  15.     let workInterval: WorkInterval
  16.     let operatingTime: OperatingTime
  17. }
  18.  
  19. // MARK: - OperatingTime
  20. struct OperatingTime: Codable {
  21.     let from, to, asapTime: Date
  22. }
  23.  
  24. // MARK: - WorkInterval
  25. struct WorkInterval: Codable {
  26.     let from, to: From
  27.     let endsAfterMidnight: Bool
  28.  
  29.     enum CodingKeys: String, CodingKey {
  30.         case from = "From"
  31.         case to = "To"
  32.         case endsAfterMidnight = "EndsAfterMidnight"
  33.     }
  34. }
  35.  
  36. // MARK: - From
  37. struct From: Codable {
  38.     let hour, minutes: Int
  39.  
  40.     enum CodingKeys: String, CodingKey {
  41.         case hour = "Hour"
  42.         case minutes = "Minutes"
  43.     }
  44. }
  45.  
  46. // MARK: - Vacation
  47. struct Vacation: Codable {
  48.     let currentVacation: JSONNull?
  49.     let vacations: [JSONAny]
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement