medium_clone

Tables (7)

Comment (Untitled4)

  • id (Key) — Primary key — NOT NULL
  • user_id (Key2) — Foreign key → User.id — NOT NULL
  • post_id (Key3) — Foreign key → Post.id — NOT NULL
  • content (Field) — string
  • createdAt (Field2) — timestamp
  • updatedAt (Field3) — timestamp

Like (Untitled3)

  • id (Key) — Primary key — NOT NULL
  • post_id (Key2) — Foreign key → Post.id — NOT NULL
  • user_id (Key3) — Foreign key → User.id — NOT NULL
  • liked (Field) — boolean

Post (Untitled)

  • id (Key) — Primary key — NOT NULL
  • user_id (Key2) — Foreign key → User.id — NOT NULL
  • title (Field) — string
  • content (Field2) — string
  • gptAnswer (Field3) — string
  • views (Field4) — long
  • isPublished (Field5) — boolean
  • isPaid (Field6) — boolean
  • createdAt (Field7) — timestamp
  • updatedAt (Field8) — timestamp

RefreshToken (Untitled6)

  • id (Key) — Primary key — NOT NULL
  • user_id (Key2) — Foreign key → User.id — NOT NULL
  • keyValue (Field) — string

Revenue (Untitled7)

  • id (Key) — Primary key — NOT NULL
  • totalRevenue (Field)

User (Untitled2)

  • id (Key) — Primary key — NOT NULL
  • username (Field) — string
  • email (Field2) — string
  • password (Field3) — string
  • cash (Field12)
  • address (Field4) — string
  • addressDetail (Field5) — string
  • profilePhotoUrl (Field6) — string
  • SocialProvider (Field7) — enum
  • isPaid (Field8) — boolean
  • emailVerified (Field9) — boolean
  • createdAt (Field10) — timestamp
  • updatedAt (Field11) — timestamp

VerificationToken (Untitled5)

  • id (Key) — Primary key — NOT NULL
  • user_id (Key2) — Foreign key → User.id — NOT NULL
  • token (Field) — string
  • expiryDate (Field2) — timestamp