오픈소드코드 분석 - RealWorld

테이블 (6)

Article (Untitled3)

  • id (PK) — Int — 기본 키 — NOT NULL
  • authorId (FK) — Int — 외래 키 → User.id — NOT NULL
  • slug (Field) — String
  • title (Field2) — String
  • description (Field3) — String
  • body (Field4) — String
  • createdAt (Field5) — DATETIME
  • updatedAt (Field6) — DATETIME

Comment (Untitled2)

  • id (PK) — Int — 기본 키 — NOT NULL
  • articleId (FK) — Int — 외래 키 → Article.id — NOT NULL
  • authorId (Key2) — Int — 외래 키 → User.id — NOT NULL
  • body (Field) — String
  • createdAt (Field2) — DATETIME
  • updatedAt (Field3) — DATETIME

Favorites (Untitled4)

  • userId (Key) — Int — 외래 키 → User.id — NOT NULL
  • articleId (PK) — Int — 외래 키 → Article.id — NOT NULL

Tag (Untitled6)

  • id (Key) — Int — 기본 키 — NOT NULL
  • name (Field) — String

Untitled5

  • articleId (PK) — Int — 외래 키 → Article.id — NOT NULL
  • tagId (Key) — Int — 외래 키 → Tag.id — NOT NULL

User (Untitled)

  • id (PK) — Int — 기본 키 — NOT NULL
  • email (Field) — String
  • username (Field2) — String
  • password (Field3) — String
  • image (Field4) — String
  • bio (Field5) — String