material

Tables (13)

AccessToken (Untitled2)

  • ID (Key) — uuid — Primary key — NOT NULL
  • userId (Key2) — uuid — Foreign key → User.ID — NOT NULL
  • jti (Field) — string
  • token (Field2) — string
  • expiresAt (Field3) — Date
  • isRevoked (Field4) — bool

AccessTokenLog (Untitled3)

  • ID (Key) — uuid — Primary key — NOT NULL
  • userAgent (Field) — string
  • endpoint (Field2) — string
  • accessedAt (Field3) — Date

Coupon (Untitled8)

  • ID (Key) — uuid — Primary key — NOT NULL
  • value (Field) — number
  • type (Field2) — enum

IssuedCoupon (Untitled9)

  • ID (Key) — uuid — Primary key — NOT NULL
  • couponId (Key2) — uuid — Foreign key → Coupon.ID — NOT NULL
  • userId (Key3) — uuid — Foreign key → User.ID — NOT NULL
  • isValid (Field) — bool
  • validFrom (Field2) — Date
  • validUntil (Field3) — Date
  • isUsed (Field4) — bool
  • usedAt (Field5) — Date

Order (Untitled10)

  • ID (Key) — uuid — Primary key — NOT NULL
  • userId (Key2) — uuid — Foreign key → User.ID — NOT NULL
  • issuedCouponId (Key22) — uuid — Foreign key → IssuedCoupon.couponId — NOT NULL
  • orderNo (Field) — string
  • amount (Field2) — number
  • status (Field3) — enum
  • pointUsed (Field4) — number
  • refundReason (Field5) — string
  • refundedAmount (Field6) — number
  • refundedAt (Field7) — Date

OrderItem (Untitled11)

  • ID (Key) — uuid — Primary key — NOT NULL
  • productId (Field) — string
  • quantity (Field2) — number

Point (Untitled6)

  • ID (Key) — uuid — Primary key — NOT NULL
  • userId (Key2) — uuid — Foreign key → User.ID — NOT NULL
  • amount (Field) — number

PointLog (Untitled7)

  • ID (Key) — uuid — Primary key — NOT NULL
  • pointId (Key2) — uuid — Foreign key → Point.ID — NOT NULL
  • amount (Field) — number
  • reason (Field2) — string
  • type (Field3) — enum

Product (Untitled12)

  • ID (Key) — uuid — Primary key — NOT NULL
  • name (Field) — string
  • price (Field2) — number
  • stock (Field3) — number
  • category (Field4) — enum
  • desc (Field5) — string
  • status (Field6)

RefreshToken (Untitled4)

  • ID (Key) — uuid — Primary key — NOT NULL
  • userId (Key2) — uuid — Foreign key → User.ID — NOT NULL
  • jti (Field) — string
  • token (Field2) — string
  • expiresAt (Field3) — Date
  • isRevoked (Field4) — bool
  • Field5

ShippingInfo (Untitled13)

  • ID (Key) — uuid — Primary key — NOT NULL
  • orderId (Key2) — uuid — Foreign key → Order.ID — NOT NULL
  • couponId (Key22) — uuid — Foreign key → Order.issuedCouponId — NOT NULL
  • status (Field)
  • trackingNumber (Field2) — string
  • company (Field3) — string
  • address (Field4) — string

TokenBlacklist (Untitled5)

  • ID (Key) — uuid — Primary key — NOT NULL
  • token (Field) — string
  • jti (Field2) — string
  • tokenType (Field3) — enum
  • expiresAt (Field4) — Date

User (Untitled)

  • ID (Key) — uuid — Primary key — NOT NULL
  • email (Field)
  • password (Field2) — string
  • phone (Field3) — string
  • role (Field4)
  • regNo (Field5)