Fandom-K ERD

Tables (10)

artist

  • artist_id — INT — Primary key — NOT NULL
  • name — VARCHAR(20) — NOT NULL
  • gender — VARCHAR(1)

content (Untitled3)

  • content_id (Key) — INT — Primary key — NOT NULL
  • artist_id — INT — Foreign key → artist.artist_id — NOT NULL
  • title (Field) — VARCHAR(20) — NOT NULL
  • text (Field2) — longtext — NOT NULL
  • url (Field3) — VARCHAR(100)
  • ip (Field4) — INT — NOT NULL
  • create_date (Field5) — datetime — NOT NULL

credit_charge (Untitled)

  • charge_id (Key) — INT — Primary key — NOT NULL
  • user_id — INT — Foreign key → user.user_id — NOT NULL
  • charge_amount (Field) — INT — NOT NULL

credit_spend

  • spend_id (Key) — INT — Primary key — NOT NULL
  • user_id — INT — Foreign key → user.user_id — NOT NULL
  • spend_amount — INT — NOT NULL

favorite_artist

  • user_id — INT — Foreign key → user.user_id — NOT NULL
  • artist_id — INT — Foreign key → artist.artist_id — NOT NULL

like_amount (Untitled4)

  • like_id (Key) — INT — Primary key — NOT NULL
  • content_id (Key2) — INT — Foreign key → content.content_id — NOT NULL
  • artist_id — INT — Foreign key → content.artist_id — NOT NULL
  • user_id — INT — Foreign key → user.user_id — NOT NULL

revenue (Untitled2)

  • revenue_id (Key2) — INT — Primary key — NOT NULL
  • charge_id (Key) — INT — Foreign key → credit_charge.charge_id — NOT NULL
  • user_id — INT — Foreign key → credit_charge.user_id — NOT NULL
  • revenue_amount (Field) — INT — NOT NULL

support

  • support_id — INT — Primary key — NOT NULL
  • artist_id — INT — Foreign key → artist.artist_id — NOT NULL
  • user_id — INT — Foreign key → credit_spend.user_id — NOT NULL
  • spend_id (Key) — INT — Foreign key → credit_spend.spend_id — NOT NULL
  • title (Field) — VARCHAR(30) — NOT NULL
  • support_category (Field5) — VARCHAR(50) — NOT NULL
  • target_amount (Field2) — INT — NOT NULL
  • current_amount (Field3) — INT — NOT NULL
  • state (Field4) — VARCHAR(10) — NOT NULL

user

  • user_id — INT — Primary key — NOT NULL
  • nickname — VARCHAR(10)
  • email — VARCHAR(30) — NOT NULL
  • password — VARCHAR(10) — NOT NULL
  • created_date — datetime — NOT NULL
  • credit_amount — INT

vote

  • vote_id (Key) — INT — Primary key — NOT NULL
  • user_id — INT — Foreign key → credit_spend.user_id — NOT NULL
  • artist_id — INT — Foreign key → artist.artist_id — NOT NULL
  • spend_id (Key2) — INT — Foreign key → credit_spend.spend_id — NOT NULL
  • vote_amount — INT
  • created_at — datetime — NOT NULL