123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- //
- // KMMemberCenterResult.swift
- // PDF Reader Pro
- //
- // Created by wanjun on 2024/10/21.
- //
- import Cocoa
- class KMMemberCenterResult: NSObject {
-
- var code : Int?
- var msg : String?
- var result : Bool?
-
- var login_Result : KMMemberLoginResult? // 登录
-
- var deviceList_Result : [KMMemberDeviceList]? // 设备列表
- var maxDeviceNum : Int? // 设备限制数
- var resultStr : String?
- var resultInt : Int?
- var userInfo : KMMemberUserInfo? //用户信息
-
- var activeVIPs : [KMMemberUserInfoActiveVIP]? // 当前会员状况
-
- var logOff: KMMemberLogOff? // 手动注销
- /**
- @abstract 新会员系统重置密码 & 验证邮箱(重置密码) & 获取邮箱验证码 & 实时检查邮件验证码
- @param code
- @param msg
- @param result
- */
- init(code: Int, msg: String, result: Bool) {
- self.code = code
- self.msg = msg
- self.result = result
- }
-
- // 邮箱登录
- /**
- @abstract 邮箱登录
- @param code
- @param msg
- @param result
- */
- init(loginResult: KMMemberLoginResult) {
- self.login_Result = loginResult
- }
-
- // 登出用户的指定设备
- init(code: Int, msg: String, resultStr: String) {
- self.code = code
- self.msg = msg
- self.resultStr = resultStr
- }
-
- // 老带新已邀请人数
- init(code: Int, msg: String, resultInt: Int) {
- self.code = code
- self.msg = msg
- self.resultInt = resultInt
- }
-
- // 获取用户登录设备列表
- init(deviceListResult: [KMMemberDeviceList], maxDeviceNum: Int) {
- self.deviceList_Result = deviceListResult
- self.maxDeviceNum = maxDeviceNum
- }
-
- /**
- @abstract 获取用户个人信息
- @param complete 回调
- */
- init(code: Int, msg: String, userInfo: KMMemberUserInfo) {
- self.code = code
- self.msg = msg
- self.userInfo = userInfo
- }
-
- /**
- @abstract 获取用户当前的会员情况
- @param code 返回值
- @param msg 返回信息
- @param activeVIPs 用户当前的会员情况
- */
- init(code: Int, msg: String, activeVIPs: [KMMemberUserInfoActiveVIP]) {
- self.code = code
- self.msg = msg
- self.activeVIPs = activeVIPs
- }
-
- /**
- @abstract 用户手动注销
- @param code 返回值
- @param msg 返回信息
- @param logOff 手动注销时间
- */
- init(code: Int, msg: String, logOff: KMMemberLogOff) {
- self.code = code
- self.msg = msg
- self.logOff = logOff
- }
- }
- class KMMemberLoginResult: NSObject {
- var refreshToken : String?
- var accessToken : String?
- var tokenType : String?
- var expiresIn : String?
- var scope : String?
-
- init(refreshToken: String, accessToken: String, tokenType: String, expiresIn: String, scope: String = "") {
- self.refreshToken = refreshToken
- self.accessToken = accessToken
- self.tokenType = tokenType
- self.expiresIn = expiresIn
- self.scope = scope
- }
- }
- class KMMemberDeviceList: NSObject {
- var id: String? // 解绑时需要
- var deviceId: String? // 设备Id
- var productId: String? // 产品Id
- var uniqueSn: String? // 设备唯一标识
- var appId: String? // appId
- var userId: String?
- var device_model: String?
- var device_os: String?
- var deviceName: String?
- var language: String?
- var timeZone: String?
- var appVersion: String?
- var platform: String?
- var updatedAt: String?
- var createdAt: String?
- var validFlag: String?
-
- init(deviceId: String?, productId: String?, uniqueSn: String?, appId: String?, userId: String? = "", device_model: String? = "", device_os: String? = "", deviceName: String? = "", language: String? = "", timeZone: String? = "", appVersion: String? = "", platform: String? = "", updatedAt: String? = "", createdAt: String? = "", validFlag: String? = "") {
- self.deviceId = deviceId
- self.productId = productId
- self.uniqueSn = uniqueSn
- self.appId = appId
- self.userId = userId
- self.device_model = device_model
- self.device_os = device_os
- self.deviceName = deviceName
- self.language = language
- self.timeZone = timeZone
- self.appVersion = appVersion
- self.platform = platform
- self.updatedAt = updatedAt
- self.createdAt = createdAt
- self.validFlag = validFlag
- }
- }
- class KMMemberUserInfo: NSObject {
- var id : String = "" // 【必需】用户id
- var email : String = "" // 【必需】邮箱
- var fullName : String = "" // 【必需】名称
- var activeVIP : [KMMemberUserInfoActiveVIP] = [] // 【必需】活跃的会员
- var activeAI : [KMMemberUserInfoActiveVIP] = [] // 【必需】活跃的AI
- var aiPoint : Int = 0 // 【必需】ai点数
- var validFlag : String = "" // 【必需】注销(0), * 正常(1), * 停用(2), * 注销中(5);
- // var isHavePwd : String = "" // 【必需】1是0否 是否设置了密码
- var isHaveAIDiscount: String = "" // 【必需】1是0否 是否有ai折扣
- var canTrail : String = "" // 【必需】1是0否 是否能试用
-
- init(id: String = "", email: String = "", fullName: String = "", activeVIP: [KMMemberUserInfoActiveVIP] = [], activeAI: [KMMemberUserInfoActiveVIP] = [], aiPoint: Int = 0, validFlag: String = ""/*, isHavePwd: String = ""*/, isHaveAIDiscount: String = "", canTrail: String = "") {
- self.id = id
- self.email = email
- self.fullName = fullName
- self.activeVIP = activeVIP
- self.activeAI = activeAI
- self.aiPoint = aiPoint
- self.validFlag = validFlag
- // self.isHavePwd = isHavePwd
- self.isHaveAIDiscount = isHaveAIDiscount
- self.canTrail = canTrail
- }
- }
- class KMMemberUserInfoActiveVIP: NSObject {
- var id : String = "" // 【可选】id
- var userId : String = "" // 【可选】用户id
- var status : Int = 0 // 【可选】状态 0注册1订阅中2订阅过期3试用中4试用过期
- var endDate : String = "" // 【可选】到期时间
- var payType : Int = 0 // 【可选】0未开启自动续订 1自动续订
- var productName : String = "" // 【可选】产品名字
- var levels : String = "" // 【可选】会员等级 1是免费 2是标准 3是高级
- var platforms : String = "" // 【可选】支持的平台
- var point : Int = 0 // 【可选】剩余ai点数(svip才有)
- var maxDeviceNum : Int = 0 // 【可选】最大登录设备限制数
- var paymentModel : String = "" // 【可选】支付方式 付费模式(1自动续订(vip svip) 2单次付费(永久会员))
- var isAi : String = "" // 【可选】是否是ai产品(0否1是)
- var cycle : Int = 0 // 【必需】订阅周期:1、月(30天);2、季(90天);3、半年(183天);4、年(365天)
- init(id: String = "", userId: String = "", status: Int = 0, endDate: String = "", payType: Int = 0, productName: String = "", levels: String = "", platforms: String = "", point: Int = 0, maxDeviceNum: Int = 0, paymentModel: String = "", isAi: String = "", cycle: Int = 0) {
- self.id = id
- self.userId = userId
- self.status = status
- self.endDate = endDate
- self.payType = payType
- self.productName = productName
- self.levels = levels
- self.platforms = platforms
- self.point = point
- self.maxDeviceNum = maxDeviceNum
- self.paymentModel = paymentModel
- self.isAi = isAi
- self.cycle = cycle
- }
- }
- class KMMemberLogOff: NSObject {
- var currentTime : String? // 【必需】id
- var logOffTime : String? // 【必需】用户id
-
- init(currentTime: String? = "", logOffTime: String? = "") {
- self.currentTime = currentTime
- self.logOffTime = logOffTime
- }
- }
|