
DB DESIGN:
- users: id, user_firstname, user_lastname, username, email, email_verified_at, avatar, password, gender, status, level
- categories: id, category_name, parent_id, slug, user_id(fk - users), status(0: unpublished, 1: published), type(product or blog)
- brands: id, brand_name, slug, brand_image(an array of images can be many), status(0: unpublished, 1: published)
- products: id, user_id(fk - users), category_id(fk - categories), brand_id(fk - brands), product_name, slug, tags, product_price, discount, product_description, product_view, product_rating, status(0: unpublished, 1: published), product_images(an array of image, can be many)
- product_reviews: id, product_id(fk - products), user_id(fk - users: if user logged in), review_email, review_firstname, review_lastname, review, review_rate(star rating from 1 to 5), status(0: unpublished, 1: published)
- blogs: id, category_id(fk - categories), blog_thumbnail, blog_title, slug, blog_summary, blog_content, blog_like, blog_views, status(0: unpublished, 1: published)
- blog_comments: id, parent_id, comment_email, comment_user(fk - users: if user logged in), blog_id(fk - blogs), blog_comment_content, status(0: unpublished, 1: published)
- tags: id, tag_name, slug, tag_type(can be product or blog)
- orders: id, user_id(fk - users: if user is logged in), order_firstname, order_lastname, order_email, order_phone, order_note, order_billing_address, order_payment_method(ship cod, online payment), order_delivery_fee, order_total(total of order), order_status(pending, cancel, completed)
- order_details: order_id(fk - orders), product_id(fk - products), product_name(name at the time user order), product_price(price at the time user order, quantity
- coupons: id, coupon_remaning, coupon_discount_percentage, coupon_expired_at
- email_subcribers(cronjob send mail): id, subcriber_email
- contacts: id, contact_firstname, contact_lastname, contact_email, contact_message