Shopping

Tables (5)

Product

  • Key — Integer — Primary key — NOT NULL
  • discountId — Foreign key → discount.Key — NOT NULL
  • serialNumber — VARCHAR(255)
  • productName — VARCHAR(255)
  • productPrice — Float
  • productLocation — VARCHAR(255)
  • productAdult — BOOLEAN
  • productDescription (productDescripttion) — TEXT
  • productImage — VARCHAR(255)
  • detectName — VARCHAR(255)
  • productBarcode — Integer

Purchase

  • Key — Integer — Primary key — NOT NULL
  • userId — Integer — Foreign key → User.Key — NOT NULL
  • purchasedDate — Date
  • totalPrice — double

PurchaseProduct

  • Key — Integer — Primary key — NOT NULL
  • purchaseId — Integer — Foreign key → Purchase.Key — NOT NULL
  • productId — Integer — Foreign key → Product.Key — NOT NULL
  • count — Integer
  • singlePrice — double

User

  • Key — Integer — Primary key — NOT NULL
  • email — VARCHAR(255)
  • password — VARCHAR(255)
  • username — VARCHAR(255)
  • birthDate — LocalDate
  • oAuthProvider — VARCHAR(255)
  • roles — VARCHAR(255)
  • isAdult — Boolean
  • nickname — VARCJHAR(255)
  • phoneNumber — VARCHAR(255)
  • profileImage — VARCHAR(255)

discount

  • Key — Primary key — NOT NULL
  • discountType — VARCHAR(255)