KMAdvertisementModel.swift 5.5 KB

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