6

Tables (10)

Artist_Categories

  • category_id — INT
  • name — VARCHAR(50) — NOT NULL
  • description — VARCHAR(200)
  • created_at — TIMESTAMP

Artists

  • artist_id — INT
  • name — VARCHAR(100) — NOT NULL
  • description — TEXT
  • category_id — INT
  • debut_date — DATE
  • agency — VARCHAR(100)
  • profile_image_url — VARCHAR(500)
  • created_at — TIMESTAMP
  • INDEX — idx_name
  • INDEX — idx_category

Credit_Transactions

  • transaction_id — INT
  • user_id — INT — NOT NULL
  • transaction_type — ENUM('charge', 'spend', 'refund') — NOT NULL
  • amount — DECIMAL(10,2) — NOT NULL
  • balance_after — DECIMAL(10,2) — NOT NULL
  • description — VARCHAR(255)
  • reference_type — ENUM('donation', 'vote', 'charge', 'refund')
  • reference_id — INT
  • created_at — TIMESTAMP
  • INDEX — idx_user_id
  • INDEX — idx_transaction_type

Credits

  • user_id — INT
  • balance — DECIMAL(10, 2) — NOT NULL
  • last_updated — TIMESTAMP

Donations

  • donation_id — INT
  • user_id — INT — NOT NULL
  • tribute_id — INT — NOT NULL
  • amount — DECIMAL(10, 2) — NOT NULL
  • donated_at — TIMESTAMP
  • INDEX — idx_user_id
  • INDEX — idx_tribute_id
  • INDEX — idx_donated_at

Follows

  • follow_id — INT
  • user_id — INT — NOT NULL
  • artist_id — INT — NOT NULL
  • followed_at — TIMESTAMP
  • INDEX — idx_user_id
  • INDEX — idx_artist_id

Tributes

  • tribute_id — INT
  • artist_id — INT — NOT NULL
  • title — VARCHAR(200) — NOT NULL
  • description — TEXT
  • goal_amount — DECIMAL(12, 2) — NOT NULL
  • current_amount — DECIMAL(12, 2)
  • status — ENUM('active', 'achieved', 'expired', 'cancelled')
  • start_date — DATE
  • end_date — DATE
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • INDEX — idx_artist_id
  • INDEX — idx_status
  • INDEX — idx_end_date

Users

  • user_id — INT
  • username — VARCHAR(50) — NOT NULL
  • email — VARCHAR(100) — NOT NULL
  • password_hash — VARCHAR(255) — NOT NULL
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • INDEX — idx_username
  • INDEX — idx_email

Vote_Categories

  • vote_category_id — INT
  • category_name — VARCHAR(50) — NOT NULL
  • description — TEXT
  • credit_cost — DECIMAL(8,2) — NOT NULL
  • is_active — BOOLEAN
  • created_at — TIMESTAMP

Votes

  • vote_id — INT
  • user_id — INT — NOT NULL
  • artist_id — INT — NOT NULL
  • vote_category_id — INT — NOT NULL
  • credit_cost — DECIMAL(8,2) — NOT NULL
  • voted_at — TIMESTAMP
  • INDEX — idx_user_id
  • INDEX — idx_artist_id
  • INDEX — idx_vote_category_id