Sream E-Commerce

Tables (10)

Brands (brands)

  • BrandCode (id) — NOT NULL — Primary key — NOT NULL
  • BrandName (name) — NOT NULL

OrderStatus (order_status)

  • OrderStatusCode (id) — NOT NULL — Primary key — NOT NULL
  • OrderStatus (order_status) — NULL

Orders (orders)

  • OrderCode (id) — NOT NULL — Primary key — NOT NULL
  • OrderStatusCode (order_status_id) — NOT NULL — Foreign key → OrderStatus.OrderStatusCode — NOT NULL
  • TradeCode (trade_id) — NOT NULL — Foreign key → Trades.TradeCode — NOT NULL
  • BuyerID (buyer_id) — NOT NULL — Foreign key → User.UserID — NOT NULL
  • SellerID (seller_id) — NOT NULL — Foreign key → User.UserID — NOT NULL
  • DateCreated (created_at) — NOT NULL
  • DateUpdated (updated_at) — NULL

ProductImages (product_images)

  • ProductImageCode (id) — NOT NULL — Primary key — NOT NULL
  • ProductID (product_id) — NOT NULL — Foreign key → Products.ProductID — NOT NULL
  • Image (image_url) — NOT NULL

ProductSizes (product_sizes)

  • ProductSizeCode (id) — NOT NULL — Primary key — NOT NULL
  • ProductID (product_id) — NOT NULL — Foreign key → Products.ProductID — NOT NULL
  • SizeCode (size_id) — NOT NULL — Foreign key → Sizes.SizeCode — NOT NULL

Products (products)

  • ProductID (id) — NOT NULL — Primary key — NOT NULL
  • BrandCode (brand_id) — NOT NULL — Foreign key → Brands.BrandCode — NOT NULL
  • ProductName (name) — NULL
  • ReleasePrice (release_price) — NOT NULL
  • DateCreated (created_at) — NOTNULL
  • DateUpdated (updated_at) — NULL
  • DateDeleted (deleted_at) — NULL

Sizes (sizes)

  • SizeCode (id) — NOT NULL — Primary key — NOT NULL
  • Size (name) — NOT NULL

Trades (trades)

  • TradeCode (id) — NOT NULL — Primary key — NOT NULL
  • UserID (user_id) — NOT NULL — Foreign key → User.UserID — NOT NULL
  • ProductSizeCode (product_size_id) — NOT NULL — Foreign key → ProductSizes.ProductSizeCode — NOT NULL
  • SoldPrice (price) — NOT NULL
  • DateCreated (created_at) — NOT NULL
  • DateUpdated (updated_at) — NULL

User (users)

  • UserID (user_id) — NOT NULL — Primary key — NOT NULL
  • SocialLoginID (social_login_id) — NULL
  • Email (email) — NULL
  • Password (password) — NULL
  • Name (name) — NULL
  • PhoneNumber (phone_number) — NULL
  • Point (point) — NULL
  • DateCreated (created_at) — NOTNULL
  • DateUpdated (updated_at) — NOTNULL

Wishlist (wishlists)

  • WishProductID (id) — NOT NULL — Primary key — NOT NULL
  • UserID (userId) — NOT NULL — Foreign key → User.UserID — NOT NULL
  • ProductID (product_id) — NOT NULL — Foreign key → Products.ProductID — NOT NULL