KMAdvertisementModel.swift 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. //
  2. // KMAdvertisementModel.swift
  3. // KMAdvertisement
  4. //
  5. // Created by lizhe on 2022/11/30.
  6. //
  7. @objcMembers public class KMAdvertisementInfo: NSObject, Codable {
  8. public var recommondContent: KMAdvertisementContent?
  9. public var advertisement: KMAdvertisementItem?
  10. public var remoteControl: KMAdvertisementRemoteControl?
  11. public var discountContent: KMAdvertisementItem?
  12. public var popWindowContent: KMAdvertisementItem?
  13. }
  14. @objcMembers public class KMAdvertisementContent: NSObject, Codable {
  15. public var recommondContentOther: KMAdvertisementItem?
  16. public var recommondContentPDFPro: KMAdvertisementItem?
  17. }
  18. @objcMembers public class KMAdvertisementItem: NSObject, Codable {
  19. public var version: String?
  20. public var name: Language?
  21. public var content: [KMAdvertisementItemInfo]?
  22. }
  23. @objcMembers public class KMAdvertisementRemoteControl: NSObject, Codable {
  24. var showMenuHelpInfo: String?
  25. }
  26. @objcMembers public class KMAdvertisementItemInfo: NSObject, Codable {
  27. var index: Int?
  28. var show: String? //是否显示,内部有做了时间区间判断
  29. var subscriptionType: String? //类型
  30. var showType: KMAdvertisementShowType?
  31. var startTime: String?
  32. var endTime: String?
  33. var version: String? //版本号,唯一标识符
  34. var showCloseBtn: String? //是否显示关闭按钮,(左下角广告需要)
  35. var image: Image? //APP互推,常规状态下的图片
  36. var iconImage: String? //广告显示图片(自适应多语)
  37. var name: Language? //名称(自适应多语)
  38. var tooltip: Language? //提示语(自适应多语)
  39. var linkURL: Language? //跳转链接(自适应多语)
  40. var subTitle: Language? //名称(自适应多语)
  41. var otherTitle: Language? //名称(自适应多语)
  42. var btnTitle: Language? //名称(自适应多语)
  43. //Firebase
  44. var firebaseEvent: String?
  45. var firebasePropertyKey: String?
  46. var firebasePropertyValue: String?
  47. public class Image: NSObject, Codable {
  48. public let zh_TW: String?
  49. public let hover_Dark: String?
  50. public let hover_Light: String?
  51. public let zh_CN: String?
  52. public let normal_Light: String?
  53. public let normal_Dark: String?
  54. public let en: String?
  55. }
  56. }
  57. public class Language: NSObject, Codable {
  58. var en: String?
  59. var zh_TW: String?
  60. var zh_CN: String?
  61. }
  62. //@objcMembers public class KMAdvertisementModel: NSObject, Codable {
  63. // public var appName: KMAdvertisementAppNameType = .FilmageEditorMac //产品名
  64. // public var platform: KMAdvertisementPlatformType = .Mac //平台
  65. // public var showType: KMAdvertisementShowType = .view //显示类型
  66. // public let startTime: String? //开始时间 时间戳
  67. // public let endTime: String? //结束时间 时间戳
  68. // public let version: String? //小于等于此版本生效
  69. // public let hidden: Bool? //是否显示
  70. // let subscribeType: KMAdvertisementSubscribeType? //是否订阅
  71. // public var content: [KMAdvertisementModelSection]?
  72. //}
  73. //
  74. //@objcMembers public class KMAdvertisementModelSection: NSObject, Codable {
  75. // public let sectionTitle: KMAdvertisementModelItem.Text?
  76. // public var content: [KMAdvertisementModelItem]?
  77. //}
  78. //
  79. //@objcMembers public class KMAdvertisementModelItem: NSObject, Codable {
  80. // public var productID: String?
  81. // public let startTime: String? //开始时间 时间戳
  82. // public let endTime: String? //结束时间 时间戳
  83. // public var hidden: Bool?
  84. //
  85. // public var index: Int?
  86. // public let title: Text?
  87. // public let imageURL: Image?
  88. // public let ipadImageURL: Image?
  89. // public let linkURL: Language?
  90. // public let tips: Language?
  91. // public let button: Text?
  92. // public var actionType: KMAdvertisementActionType = .URL
  93. //
  94. // public struct Text: Codable {
  95. // public let font: Font?
  96. // public let color: Color?
  97. // public let background: Background?
  98. // public let language: Language?
  99. // }
  100. //
  101. // public struct Font: Codable {
  102. // public let name: String?
  103. // public let size: Int?
  104. // }
  105. //
  106. // public struct Color: Codable {
  107. // let height: ColorState?
  108. // let normal: ColorState?
  109. //
  110. // struct ColorState: Codable {
  111. // public let dark: ColorInfo?
  112. // public let universal: ColorInfo?
  113. //
  114. // struct ColorInfo: Codable {
  115. // public var hex: String?
  116. // public var alpha: Float?
  117. // }
  118. // }
  119. // }
  120. //
  121. // public struct Background: Codable {
  122. // let color: Color?
  123. // let layer: Layer?
  124. //
  125. // struct Layer: Codable {
  126. // public let cornerRadius: CGFloat?
  127. // public let borderWidth: CGFloat?
  128. // public let borderColor: Color?
  129. // }
  130. // }
  131. //
  132. // public struct Image: Codable {
  133. // public let height: ImageInfo?
  134. // public let normal: ImageInfo?
  135. // public let background: Background?
  136. // }
  137. //
  138. // public struct ImageInfo: Codable {
  139. // public let dark: Language?
  140. // public let universal: Language?
  141. // }
  142. //
  143. // public class Language: NSObject, Codable {
  144. // public let en: String?
  145. // public let zh_TW: String?
  146. // public let zh_CN: String?
  147. // }
  148. //}