OOCalendarModels.swift 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. //
  2. // OOCalendarModels.swift
  3. // O2Platform
  4. //
  5. // Created by FancyLou on 2018/7/24.
  6. // Copyright © 2018 zoneland. All rights reserved.
  7. //
  8. import HandyJSON
  9. //MARK: - 日历对象
  10. class OOCalendarInfo: NSObject, DataModel {
  11. @objc var id: String?
  12. @objc var name: String?
  13. @objc var type: String?
  14. @objc var color: String?
  15. var manageable: Bool?
  16. var isPublic: Bool?
  17. var followed: Bool?
  18. @objc var target: String?
  19. @objc var desc: String? // 服务端字段是:description 这边冲突所以用desc
  20. @objc var status: String?
  21. @objc var createor: String?
  22. // @objc var publishable:Bool?
  23. @objc var source:String?
  24. @objc var manageablePersonList:[String]?
  25. @objc var followers:[String]?
  26. @objc var viewablePersonList:[String]?
  27. @objc var viewableUnitList:[String]?
  28. @objc var viewableGroupList:[String]?
  29. @objc var publishablePersonList:[String]?
  30. @objc var publishableUnitList:[String]?
  31. @objc var publishableGroupList:[String]?
  32. required override init(){}
  33. func mapping(mapper: HelpingMapper) {
  34. mapper <<< self.desc <-- "description"
  35. }
  36. }
  37. //MARK: - 我的日历列表
  38. class OOMyCalendarList: NSObject, DataModel {
  39. @objc var myCalendars: [OOCalendarInfo]?
  40. @objc var unitCalendars: [OOCalendarInfo]?
  41. @objc var followCalendars: [OOCalendarInfo]?
  42. required override init() {
  43. }
  44. }
  45. //MARK: - 日程对象
  46. class OOCalendarEventInfo: NSObject, DataModel {
  47. @objc var id: String?
  48. @objc var calendarId: String?
  49. @objc var repeatMasterId: String?
  50. @objc var eventType: String?
  51. @objc var title: String?
  52. @objc var color: String?
  53. @objc var comment: String?
  54. @objc var startTime: String?
  55. @objc var startTimeStr: String?
  56. @objc var endTime: String?
  57. @objc var endTimeStr: String?
  58. @objc var locationName: String?
  59. @objc var recurrenceRule: String?
  60. var alarm: Bool?
  61. @objc var alarmTime: String?
  62. var alarmAlready: Bool?
  63. @objc var valarmTime_config: String?
  64. @objc var valarm_Summary: String?
  65. var isAllDayEvent: Bool?
  66. var daysOfDuration: Int?
  67. var isPublic: Bool?
  68. @objc var source: String?
  69. @objc var createPerson: String?
  70. @objc var updatePerson: String?
  71. @objc var targetType: String?
  72. @objc var participants: [String]?
  73. @objc var manageablePersonList: [String]?
  74. @objc var viewablePersonList: [String]?
  75. @objc var viewableUnitList: [String]?
  76. @objc var viewableGroupList: [String]?
  77. required override init() {
  78. }
  79. }
  80. // 某一天的日程对象
  81. class OOCalendarEventInOneDay: NSObject, DataModel {
  82. @objc var eventDate:String?
  83. @objc var inOneDayEvents: [OOCalendarEventInfo]?
  84. required override init() {
  85. }
  86. }
  87. // 查询日程返回对象
  88. class OOCalendarEventResponse: NSObject, DataModel {
  89. @objc var inOneDayEvents: [OOCalendarEventInOneDay]?
  90. @objc var wholeDayEvents: [OOCalendarEventInfo]?
  91. required override init() {
  92. }
  93. }
  94. // 查询日程条件对象
  95. class OOCalendarEventFilter: NSObject, DataModel {
  96. @objc var calendarIds:[String]?
  97. @objc var createPerson:String?
  98. @objc var startTime:String?
  99. @objc var endTime:String?
  100. required override init() {
  101. }
  102. }