ERD

Tables (9)

BLACKLIST (Untitled6)

  • userId (Key22) — text — Foreign key → USERS.userId — NOT NULL
  • createdAt — timestamp
  • description — text

COMMUNITY_POSTS (Untitled8)

  • id — Primary key — NOT NULL
  • userId — text — Foreign key → USERS.userId — NOT NULL
  • createdAt — timestamp
  • title — text
  • description — text
  • active — boolean

COMMUNITY_REPLIES (Untitled9)

  • id — Foreign key → COMMUNITY_POSTS.id — NOT NULL
  • userId — text
  • description — text
  • createdAt — timestamp
  • active — boolean

DOWNLOADS (Untitled5)

  • pk (Key) — Foreign key → FILES.pk — NOT NULL
  • fileId — text — Foreign key → FILES.fileId — NOT NULL
  • userId — text
  • createdAt — timestamp

FILES (Untitled2)

  • pk (Key) — Primary key — NOT NULL
  • fileId (Key2) — text — Foreign key → LISTINGS.userId — NOT NULL
  • userId (Key222) — text — Foreign key → LISTINGS.userId — NOT NULL
  • fileLink — text
  • fileType — text
  • Field

LISTINGS (Untitled3)

  • userId (Key) — text — Primary key — NOT NULL
  • fileId (Key2) — text — Foreign key → SALES.fileId — NOT NULL
  • userId (Key222) — text — Foreign key → SALES.userId — NOT NULL
  • uploadedAt — text
  • title — text
  • description — text
  • filePreview — char
  • active — boolean
  • price — integer

REVIEWS (Untitled7)

  • fileId (Key2) — text — Foreign key → LISTINGS.fileId — NOT NULL
  • userId — text
  • stars — integer
  • review — text
  • createdAt — timestamp

SALES (Untitled4)

  • fileId (Key) — text — Primary key — NOT NULL
  • userId (Key22) — text — Foreign key → USERS.userId — NOT NULL
  • createdAt — timestamp
  • price — integer
  • buyerId — text
  • paymentGateway — text

USERS (Untitled)

  • pk (Key) — Primary key — NOT NULL
  • userId (Key22) — text — Foreign key → LISTINGS.fileId — NOT NULL
  • type — text
  • sns — text
  • email — text
  • verified — boolean
  • snsKey — text
  • active — boolean
  • createdAt — timestamp
  • password — text
  • Field