User Struct:
struct User: Codable, Identifiable {
let id = UUID()
let userId: Int?
let userName: String?
let userDocument: [UserDocument]?
}
UserDocument Struct:
struct UserDocument: Codable, Identifiable {
let id = UUID()
let userDocumentId: Int?
let userId: Int?
let documentId: Int?
let document: Document?
}
Document Struct:
struct Document: Codable {
let documentId: Int
let ownerId: Int?
let secureName: String?
let title: String?
let description: String?
let fileExtension: String?
let fileSize: Int64?
let url: String?
}
And This is Request Body (I'm stuck here):
let body: [String: Any?] = ["userId": 0, "userName": "name", "userDcuments": ?....]