Open mhmdrioaf opened 1 year ago
Seller user should have all regular user attributes.
users: { uid: string, name: string, profile_picture_url: string, email: string, phone_number: int, addresses: { delivery_address: string, public_address: string, }, cart: [ { product_id: string, product_name: string, product_seller_name: string, product_price: int, }, ], wishlist: [ { product_id: string, product_name: string, product_price: int, product_seller_name: string, product_available: boolean, } ], orders: { processed_orders: [ order_id: string, product_id: string, product_name: string, product_description: string, product_seller_name: string, ], finished_orders: [ order_id: string, product_id: string, product_name: string, product_description: string, product_seller_name: string, order_date: date, ] } }
[ ] ### Seller user (students, teachers):
users: { ...sameAsRegularUserAttributes, products: { posted: [ { product_id: string, post_date: date, } ], drafted: [ { product_id: string, product_name: string, product_descriptions: string, product_price: int, product_stock: int, product_available: boolean, product_images: [ image: string _(because it's used for firebase storage reference)_ ] } ] } orders: [ { order_id product_id customer_id order_date order_status } ] }
[x] ### Products:
products: { product_id: string, product_name: string, product_description: string, product_pictures: [ image: string _(because it's used for firebase storage reference)_ ], product_price: int, product_rating: [ { customer_id: string, customer_name: string, rating: number, } ], product_stock: int, product_available: boolean, product_comments: [ { customer_name: string, comment: string, comments_date: date, } ], wishlisted_count: int, }
The data model has been implemented.
[ ] ### Seller user (students, teachers):
[x] ### Products: