store-poc

Tables (11)

Account (Untitled6)

  • id (Key) — Primary key — NOT NULL
  • userId (Key2) — Foreign key → User.id — NOT NULL
  • currencyId (Key3) — Foreign key → Currency.id — NOT NULL
  • createdAt (Field)
  • updatedAt (Field2)

AccountDetail (Untitled7)

  • id (Key) — Primary key — NOT NULL
  • accountId (Key2) — Foreign key → Account.id — NOT NULL
  • previousAccountDetailId (Key3) — Foreign key → AccountDetail.id — NOT NULL
  • prevBalance (Field)
  • chageAmount (Field2)
  • newBalance (Field3)
  • createdAt (Field4)
  • updatedAt (Field5)

Currency (Untitled5)

  • id (Key) — Primary key — NOT NULL
  • iconUrl (Field)
  • name (Field2)
  • description (Field3)
  • createdAt (Field4)
  • updatedAt (Field5)

Payment (Untitled10)

  • id (Key) — Primary key — NOT NULL
  • purchaseId (Key2) — Foreign key → Purchase.id — NOT NULL
  • amount (Field)
  • status (Field2)
  • createdAt (Field3)
  • updatedAt (Field4)

PaymentDetail (Untitled11)

  • id (Key) — Primary key — NOT NULL
  • paymentId (Key2) — Foreign key → Payment.id — NOT NULL
  • platform (Field)
  • method (Field2)
  • type (Field3)
  • amount (Field4)
  • createdAt (Field5)
  • updatedAt (Field6)
  • currencyId (Key3) — Foreign key → Currency.id — NOT NULL

Product (Untitled2)

  • id (Key) — Primary key — NOT NULL
  • currencyId (Key2) — Foreign key → Currency.id — NOT NULL
  • defaultImageUrl (Field)
  • emptyImageUrl (Field2)
  • imageUrl (Field3)
  • sampleImageUrls (Field4)
  • name (Field5)
  • description (Field6)
  • type (Field7)
  • stockQuantity (Field8)
  • startDate (Field9)
  • endDate (Field10)
  • price (Field11)
  • isActive (Field12)
  • createdAt (Field13)
  • updatedAt (Field14)

ProductPromotion (Untitled4)

  • productId (Key) — Foreign key → Product.id — NOT NULL
  • promotionId (Key2) — Foreign key → Promotion.id — NOT NULL
  • createdAt (Field)
  • updatedAt (Field2)

Promotion (Untitled3)

  • id (Key) — Primary key — NOT NULL
  • name (Field)
  • description (Field2)
  • startDate (Field3)
  • endDate (Field4)
  • type (Field5)
  • value (Field6)
  • createdAt (Field7)
  • updatedAt (Field8)

Purchase (Untitled8)

  • id (Key) — Primary key — NOT NULL
  • userId (Key3) — Foreign key → User.id — NOT NULL
  • currencyId (Key2) — Foreign key → Currency.id — NOT NULL
  • totalPrice (Field)
  • status (Field2)
  • createdAt (Field3)
  • updatedAt (Field4)

PurchaseProduct (Untitled9)

  • id (Key) — Primary key — NOT NULL
  • amount (Field)
  • originalPrice (Field2)
  • price (Field3)
  • snapshot (Field4)
  • createdAt (Field5)
  • updatedAt (Field6)
  • purchaseId (Key2) — Foreign key → Purchase.id — NOT NULL
  • productId (Key3) — Foreign key → Product.id — NOT NULL
  • promotionId (Key4) — Foreign key → Promotion.id — NOT NULL
  • currencyId (Key5) — Foreign key → Currency.id — NOT NULL

User (Untitled)

  • id (Key) — Primary key — NOT NULL
  • email (Field)
  • createdAt (Field2)
  • updatedAt (Field3)