Files
Woka_Native_iOS/WOKA/Authentication/Model/UserRegPostModel.swift
BilalKhanWDI d6624b8de7 - Added api for username check
- Added checks and error for the name, username and password
- On gender select adding values to the post reg struct.
- Handled the interest selection into a array to post to the reg struct
- Finalised the Age Select vc with gender select, date select, interest select
- Added Avatar API
2024-05-08 19:36:20 +05:30

42 lines
1.1 KiB
Swift

//
// UserRegPostModel.swift
// WOKA
//
// Created by MacBook Pro on 07/05/24.
//
import Foundation
struct UserRegPostModel: Encodable {
var full_name: String?
var username : String?
var password : String?
var gender : Int? //mandatory (1 for girl/female, 2 for boy/male)
var date_of_birth: String? //2015-11-1
var email: String?
var guardian_email: String?
var user_type: String?
var language_id: String?
var interest_topic_id: [Int]?
var avtar: String?
var add_child: String?
var dictionaryRepresentation: [String: Any] {
return [
"full_name": full_name ?? "",
"username" : username ?? "",
"password" : password ?? "",
"gender" : gender ?? "",
"date_of_birth": date_of_birth ?? "",
"email": email ?? "",
"guardian_email": guardian_email ?? "",
"user_type": user_type ?? "",
"language_id": language_id ?? "",
"interest_topic_id": interest_topic_id ?? [],
"avtar": avtar ?? "",
"add_child": add_child ?? "",
]
}
}