Create new Collection or add a field

Hello everyone! I am creating a food delivery app. What is the best way to manage my Order? I want to have 3 types of orders: live, bought, completed. Should I create 3 different Collections or only one collection where I have a field name “type”? Also, order collection has the shop and user id, what is the best way to search in the collection for both id’s?

Hello @Ciprian_Gabor,

Your food delivery app appears to have a similarity with the Kotlin tutorial that can help.

For search queries, you can check the Realm Query Language section in the documentation.

I hope the provided information is helpful. Please don’t hesitate to ask if you need further assistance.

Cheers, :performing_arts:
Henna

Thanks for you answer. Why I should use an Enum class and not a simple string field?

@Ciprian_Gabor: You can use. It’s just that Enums is considered a little better approach than String.

1 Like