- Added verify OTP api - Modified the flow - Made a authfunc to handle the type of user and the language selected - Added OTP fields combine logic. Also handled the otp blank checks. - Added API for intrestes get
53 lines
2.6 KiB
Swift
53 lines
2.6 KiB
Swift
//
|
|
// UserRegPostModel.swift
|
|
// WOKA
|
|
//
|
|
// Created by MacBook Pro on 07/05/24.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
//[{"key":"full_name","value":"DemoUser","description":"mandatory","type":"text"},{"key":"username","value":"tests104","description":"mandatory","type":"text"},{"key":"password","value":"123456","description":"mandatory (minimum 6 character)","type":"text"},{"key":"gender","value":"1","description":"mandatory (1 for girl/female, 2 for boy/male)","type":"text"},{"key":"birthdate","value":"2015-11-1","description":"mandatory","type":"text"},{"key":"email","value":"pradyumn@wdimails.com1","description":"mandatory","type":"text"},{"key":"guardian_email","value":"pradyumn@wdimails.com1","description":"mandatroy if user type = 1","type":"text"},{"key":"user_type","value":"1","description":"mandatory ( 1 = below 16, 2 = above 16)","type":"text"},{"key":"language_id","value":"1","description":"mandatory","type":"text"},{"key":"ip_address","value":"111","description":"non mandatory","type":"text","enabled":false},{"key":"interest_topic_id[0]","value":"1","description":"mandatory if user type=1","type":"text"},{"key":"interest_topic_id[1]","value":"2","description":"mandatory if user type=1","type":"text"},{"key":"avtar","value":"avatar1.png","description":"mandatory","type":"text"},{"key":"add_child","value":"1","description":"mandatory when parent adding child","type":"text"}]
|
|
|
|
struct UserRegPostModel: Encodable {
|
|
var full_name: String?
|
|
var username : String?
|
|
var password : String?
|
|
var date_of_birth: String?
|
|
var contact_number: String?
|
|
var email: String?
|
|
var street: String?
|
|
var town: String?
|
|
var country: String?
|
|
var state: String?
|
|
var zip_code: String?
|
|
var lat: String?
|
|
var lng: String?
|
|
var pin_code: String?
|
|
var cpin_code: String?
|
|
var one_signal_player_id: String?
|
|
var timezone: String?
|
|
|
|
var dictionaryRepresentation: [String: Any] {
|
|
return [
|
|
"full_name": full_name ?? "",
|
|
"username" : username ?? "",
|
|
"password" : password ?? "",
|
|
"date_of_birth": date_of_birth ?? "",
|
|
"contact_number": contact_number ?? "",
|
|
"email": email ?? "",
|
|
"street": street ?? "",
|
|
"town": town ?? "",
|
|
"country": country ?? "",
|
|
"state": state ?? "",
|
|
"zip_code": zip_code ?? "",
|
|
"lat": lat ?? "",
|
|
"lng": lng ?? "",
|
|
"pin_code": pin_code ?? "",
|
|
"cpin_code": cpin_code ?? "",
|
|
"one_signal_player_id": one_signal_player_id ?? "",
|
|
"timezone": timezone ?? ""
|
|
]
|
|
}
|
|
}
|