Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • You Can Use Demo as Registered User :
    user:demo pass:dohdemo

User Model

demo

Member
Joined
Dec 5, 2017
Messages
391
DEMO Swift Code

Swift:
//
//  User.swift
//  instaCloneBootcamp
//
//  Created by Eyüp Furkan Tüylü on 14.12.2023.
//

import Foundation

struct User: Identifiable,Hashable, Codable{
    let id: String
    var username: String
    var profileImageUrl: String?
    var fullname: String?
    var bio: String?
    let email: String
}

extension User{
    
    static var MOCK_USER: [User] = [
        .init(id: UUID().uuidString, username: "monkey1", profileImageUrl: "maymun-1", fullname: "Monkey 1", bio:"Lorem Ipsum is simply dummy text of the printing and typesetting industry.", email: "monkey1@gmail.com"),
        .init(id: UUID().uuidString, username: "monkey2", profileImageUrl: "maymun-2", fullname: "Monkey 2", bio:"Lorem Ipsum is simply dummy text of the printing and typesetting industry.", email: "monkey2@gmail.com"),
        .init(id: UUID().uuidString, username: "monkey3", profileImageUrl: "maymun-3", fullname: "Monkey 3", bio:"Lorem Ipsum is simply dummy text of the printing and typesetting industry.", email: "monkey3@gmail.com"),
        .init(id: UUID().uuidString, username: "monkey4", profileImageUrl: "maymun-4", fullname: "Monkey 4", bio:"Lorem Ipsum is simply dummy text of the printing and typesetting industry.", email: "monkey4@gmail.com"),
        .init(id: UUID().uuidString, username: "monkey5", profileImageUrl: "maymun-5", fullname: "Monkey 5", bio:"Lorem Ipsum is simply dummy text of the printing and typesetting industry.", email: "monkey5@gmail.com")
    ]
    
}
 
Back
Top