 struct User {}
 
 // 协议
-protocol IUser {
+protocol UserProtocol {
     func insert(_ user: User)
     func get(_ id: Int) -> User
 }
 
-struct SQLServerUser: IUser {
+struct SQLServerUser: UserProtocol {
     func insert(_ user: User) {
         print("\(#function) user")
     }

}

// 工厂协议
protocol IFactory {
    func createUser() -> IUser
    func createDepartment() -> IDepartment
}

struct SqlServerFactory: IFactory {
    func createUser() -> IUser {
        return SQLServerUser()
    }
    
    func createDepartment() -> IDepartment {
        return SQLServerDepartment()
    }
}

struct AccessFactory: IFactory {
    func createUser() -> IUser {
        return AccessUser()
    }
    
    func createDepartment() -> IDepartment {
        return AccessDepartment()
    }
}

    }
}

struct AccessUser: UserProtocol {
    func insert(_ user: User) {
        print("\(#function) user")
    }
