Como estructuro mi firebase

Necesito con firebase realtime database hacer una estructura de pedidos así...

Numero de pedido 001
- Producto1
- Producto2
- Producto3

Numero de pedido 002
- Producto1
- Producto2


Como deberia plantearla al momento de guardar los datos porque he intentado distintas formas y no lo he logrado...

What have you tried so far (show your relevant blocks) ?

Your data structure appears very simplistic for an "order". What about price/quantity/customer details etc. ?

The Order only have Product number, is a practice but i cant make this.

I make Order with number Ej. 0001 (OK)
When I make the products of this Order not know howto be save this data.

Ej. productcs to Order 0001


My block only save the Order without problem.

I do not understand this.....

This is my bd result...
In screen1 save Order Num 0001 0002
In screen2 save Items Num 1 aaaaa 2 ddddd etc.

Captura de pantalla 2023-05-19 a las 19.30

Howto see in listview the items for this order in the screen2?

The block screen1 is...

The block screen2 is...


I solution add ITEM and number de item with item data and save how many item exist in the order.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.