Can you add a class to another class object?

Iā€™m trying to assign posts to a specific user, so that it only renders the posts that the user makes. Is there a way to set the object so that it takes the specific user that is currently connected?

you can use user = await Moralis.User.current()

an example: Submit form data to Moralis database