1 file23 days ago
1

HomeModel - Plutus web

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111class User: NSObject, Mappable, Codable {
    
    var finalActualMoney: String?
    var policyURL: String?
    var finalMoney: String?
    var userIdentifyInfo: UserIndentifyInfo?
    var isUploadedVideo: String?
    var isCode: Int?
    var thirtyDayValue: String?
    var userName: String?
    var isLoComeToAccount: String?
    var isRepaid: String?
    var logCount: Int?
    var fifteenDayValue: String?
    var expiredDay: String?
    var expireTime: String?
    var userBankCard: UserBankCard?
    var loDate: String?
    var isConfirmRepaidDoneYet: String?
    var bankList: [CompanyBankCard]?
    var expiredInterestFee: String?
    var cellPhone: String?
    var creditLimit: String?
    var isLoSuccess: String?
    var loValue: String?
    var referenceInfo: ReferenceInfo?
    var currentStepUpdateProfile: Int = 0
    var location: UserLocation?
    var values: String?
    var maxMoney: String?
    var userjkqx: String?
    var period: String?
    var dayValues: String?
    var isFailed: Int?
  
    
    required init?(map: Map) {
        
    }
    
    override init() {
        
    }
    
    
    func checkCurrentStepUpdateProfile() -> Int {
        if userBankCard?.isUserBankCard == 0 {
            return 0
        }
        if userIdentifyInfo?.isUserIndentifyInfo == 0 {
            return 1
        }
        if referenceInfo?.isReferenceInfo == 0 {
            return 2
        }
        return 3
    }
    
    func calculateDayLoadFromLoDate(loDate: String) -> Int{
           switch loDate {
           case "1":
               return 15
           case "2":
               return 30
           case "3":
               return 7
           case "4":
               return 14
           case "5":
               return 21
           case "6":
               return 28
           default:
               return 0
           }
       }
    
    func mapping(map: Map) {
        finalActualMoney <- map["finalActualLo"]
        policyURL <- map["policy_url"]
        finalMoney <- map["finalMoney"]
        userIdentifyInfo <- map["step2"]
        isUploadedVideo <- map["isUploadedVideo"]
        isCode <- map["iscode"]
        thirtyDayValue <- map["thirtyDayValue"]
        userName <- map["userName"]
        isLoComeToAccount <- map["isLoComeToAccount"]
        isRepaid <- map["isRepaidLoan"]
        logCount <- map["logCount"]
        fifteenDayValue <- map["fifteenDayValue"]
        expiredDay <- map["expiredDay"]
        expireTime <- map["expireTime"]
        userBankCard <- map["step1"]
        loDate <- map["loDate"]
        isConfirmRepaidDoneYet <- map["isConfirmRepaidDoneYet"]
        bankList <- map["bankList"]
        expiredInterestFee <- map["expiredInterestFee"]
        cellPhone <- map["cellphone"]
        creditLimit <- map["creditLimit"]
        isLoSuccess <- map["isLoSuccess"]
        loValue <- map["loValue"]
        referenceInfo <- map["step3"]
        values <- map["values"]
        maxMoney <- map["maxMoney"]
        userjkqx <- map["period"]
        dayValues <- map["points"]
        period <- map["period"]
        isFailed <- map["isFailed"]
    }
    
}