-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Apr 18, 2026 at 09:05 AM
-- Server version: 8.4.3
-- PHP Version: 8.3.26

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `trevor`
--

-- --------------------------------------------------------

--
-- Table structure for table `beats`
--

CREATE TABLE `beats` (
  `id` int NOT NULL,
  `uuid` varchar(50) DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `category` varchar(50) DEFAULT NULL,
  `brand` varchar(50) DEFAULT NULL,
  `description` text,
  `tempo_bpm` int DEFAULT NULL,
  `beat_play` int DEFAULT NULL,
  `key_signature` varchar(10) DEFAULT NULL,
  `duration` varchar(20) DEFAULT NULL,
  `genre` varchar(100) DEFAULT NULL,
  `mood` varchar(100) DEFAULT NULL,
  `audio_preview_url` text,
  `cover_image_url` text,
  `wave_file_url` text,
  `is_active` tinyint(1) DEFAULT '1',
  `view_count` int DEFAULT '0',
  `featured_order` int DEFAULT '0',
  `is_featured` tinyint(1) DEFAULT '0',
  `status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `beats`
--

INSERT INTO `beats` (`id`, `uuid`, `title`, `slug`, `category`, `brand`, `description`, `tempo_bpm`, `beat_play`, `key_signature`, `duration`, `genre`, `mood`, `audio_preview_url`, `cover_image_url`, `wave_file_url`, `is_active`, `view_count`, `featured_order`, `is_featured`, `status`, `created_at`, `updated_at`) VALUES
(1, '70ab35e4-3979-11f1-b001-54ee759c7d1b', 'Midnight Vibes', 'TB-midnight-vibes', 'Drill beats', 'Trevor Beats', 'Smooth lo-fi hip hop beat with warm piano and soft drums, perfect for late-night vibes', 85, 99, 'Cm', '03:24', 'Lo-fi Hip Hop', 'Chill', 'https://storage.example.com/previews/midnight-vibes.mp3', 'uploads/covers/beat0.png', 'https://storage.example.com/waves/midnight-vibes.wav', 1, 4, 0, 1, 'active', '2026-04-16 09:48:36', '2026-04-16 09:48:36'),
(2, '70bcd495-3979-11f1-b001-54ee759c7d1b', 'Trap Empire', 'TB-trap-empire', 'Trap beats', 'Trevor Beats', 'Hard-hitting trap beat with 808s, aggressive hi-hats, and dark melodies', 140, 919, 'Fm', '03:45', 'Trap', 'Dark', 'https://storage.example.com/previews/trap-empire.mp3', 'uploads/covers/beat1.png', 'https://storage.example.com/waves/trap-empire.wav', 1, 1, 0, 1, 'active', '2026-04-16 09:48:36', '2026-04-16 09:48:36'),
(3, '70be9a3a-3979-11f1-b001-54ee759c7d1b', 'Sunset Dreams', 'TB-sunset-dreams', 'R&B', 'Trevor Beats', 'Uplifting tropical house beat with guitar melodies and summer vibes', 118, 89, 'D#m', '04:12', 'Tropical House', 'Energetic', 'https://storage.example.com/previews/sunset-dreams.mp3', 'uploads/covers/beat2.png', 'https://storage.example.com/waves/sunset-dreams.wav', 1, 0, 0, 0, 'active', '2026-04-16 09:48:36', '2026-04-16 09:48:36'),
(4, '70be9ee6-3979-11f1-b001-54ee759c7d1b', 'Dark Knight', 'TB-dark-knight', 'Dancehall', 'Trevor Beats', 'Epic orchestral trap beat with cinematic strings and heavy 808s', 150, 109, 'Em', '03:58', 'Cinematic Trap', 'Epic', 'https://storage.example.com/previews/dark-knight.mp3', 'uploads/covers/beat3.png', 'https://storage.example.com/waves/dark-knight.wav', 1, 0, 0, 0, 'active', '2026-04-16 09:48:36', '2026-04-16 09:48:36'),
(5, '70bea299-3979-11f1-b001-54ee759c7d1b', 'Neon Nights', 'TB-neon-nights', 'Drill beats', 'Trevor Beats', 'Synthwave/retro beat with 80s vibes, arpeggios, and driving drums', 120, 100, 'Am', '03:33', 'Synthwave', 'Nostalgic', 'https://storage.example.com/previews/neon-nights.mp3', 'uploads/covers/beat4.png', 'https://storage.example.com/waves/neon-nights.wav', 1, 0, 0, 1, 'active', '2026-04-16 09:48:36', '2026-04-16 09:48:36'),
(6, '70bea5f0-3979-11f1-b001-54ee759c7d1b', 'Jazz Cafe', 'TB-jazz-cafe', 'Hip Hop', 'Trevor Beats', 'Smooth jazz hip hop with double bass, soft brushes, and Rhodes piano', 92, 929, 'G#m', '03:56', 'Jazz Hop', 'Relaxed', 'https://storage.example.com/previews/jazz-cafe.mp3', 'uploads/covers/beat5.png', 'https://storage.example.com/waves/jazz-cafe.wav', 1, 0, 0, 0, 'active', '2026-04-16 09:48:36', '2026-04-16 09:48:36'),
(7, '70c11d07-3979-11f1-b001-54ee759c7d1b', 'Rage Mode', 'TB-rage-mode', 'Afro beats', 'Trevor Beats', 'High-energy rage beat with distorted 808s, aggressive drums, and dark synths', 157, 99, 'Bm', '03:17', 'Rage', 'Aggressive', 'https://storage.example.com/previews/rage-mode.mp3', 'uploads/covers/beat6.png', 'https://storage.example.com/waves/rage-mode.wav', 1, 0, 0, 0, 'active', '2026-04-16 09:48:36', '2026-04-16 09:48:36'),
(8, '70c12128-3979-11f1-b001-54ee759c7d1b', 'Soulful Melody', 'TB-soulful-melody', 'Trap beats', 'Trevor Beats', 'Soulful R&B beat with warm chords, organic drums, and emotional vocals', 75, 96, 'C#m', '03:41', 'R&B', 'Emotional', 'https://storage.example.com/previews/soulful-melody.mp3', 'uploads/covers/beat7.png', 'https://storage.example.com/waves/soulful-melody.wav', 1, 0, 0, 1, 'active', '2026-04-16 09:48:36', '2026-04-16 09:48:36'),
(9, '70c125b2-3979-11f1-b001-54ee759c7d1b', 'Drill Master', 'TB-drill-master', 'Drill beats', 'Trevor Beats', 'UK drill beat with sliding 808s, syncopated hi-hats, and dark piano', 142, 390, 'Dm', '03:28', 'UK Drill', 'Gritty', 'https://storage.example.com/previews/drill-master.mp3', 'uploads/covers/beat8.png', 'https://storage.example.com/waves/drill-master.wav', 1, 0, 0, 0, 'active', '2026-04-16 09:48:36', '2026-04-16 09:48:36'),
(10, '70c4e894-3979-11f1-b001-54ee759c7d1b', 'Festival Anthem', 'TB-festival-anthem', 'R&B', 'Trevor Beats', 'Big room EDM beat with massive drops, synth leads, and festival energy', 128, 190, 'F#m', '04:25', 'EDM', 'Energetic', 'https://storage.example.com/previews/festival-anthem.mp3', 'uploads/covers/beat9.png', 'https://storage.example.com/waves/festival-anthem.wav', 1, 0, 0, 0, 'active', '2026-04-16 09:48:36', '2026-04-16 09:48:36'),
(11, '70c4f149-3979-11f1-b001-54ee759c7d1b', 'Latin Heat', 'TB-latin-heat', 'Afro beats', 'Trevor Beats', 'Reggaeton beat with dembow rhythm, Latin percussion, and catchy melodies', 98, 179, 'Em', '03:37', 'Reggaeton', 'Dance', 'https://storage.example.com/previews/latin-heat.mp3', 'uploads/covers/beat10.png', 'https://storage.example.com/waves/latin-heat.wav', 1, 0, 0, 0, 'active', '2026-04-16 09:48:36', '2026-04-16 09:48:36'),
(12, '70c4f6d9-3979-11f1-b001-54ee759c7d1b', 'Ambient Waves', 'TB-ambient-waves', 'Dancehall', 'Trevor Beats', 'Ambient/meditation beat with pads, nature sounds, and gentle textures', 65, 90, 'Abm', '05:02', 'Ambient', 'Calm', 'https://storage.example.com/previews/ambient-waves.mp3', 'uploads/covers/beat2.png', 'https://storage.example.com/waves/ambient-waves.wav', 1, 0, 0, 0, 'active', '2026-04-16 09:48:36', '2026-04-16 09:48:36');

-- --------------------------------------------------------

--
-- Table structure for table `beat_licenses`
--

CREATE TABLE `beat_licenses` (
  `id` int NOT NULL,
  `uuid` varchar(50) DEFAULT NULL,
  `beat_uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `license_tier_uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `price` decimal(10,2) NOT NULL,
  `sale_price` decimal(10,2) DEFAULT NULL,
  `is_available` tinyint(1) DEFAULT '1',
  `max_streams` int DEFAULT NULL,
  `max_downloads` int DEFAULT NULL,
  `max_radio_stations` int DEFAULT NULL,
  `tv_sync_allowed` tinyint(1) DEFAULT '0',
  `film_sync_allowed` tinyint(1) DEFAULT '0',
  `commercial_use` tinyint(1) DEFAULT '0',
  `physical_copies` int DEFAULT NULL,
  `exclusive_rights` tinyint(1) DEFAULT '0',
  `credit_required` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `beat_licenses`
--

INSERT INTO `beat_licenses` (`id`, `uuid`, `beat_uuid`, `license_tier_uuid`, `price`, `sale_price`, `is_available`, `max_streams`, `max_downloads`, `max_radio_stations`, `tv_sync_allowed`, `film_sync_allowed`, `commercial_use`, `physical_copies`, `exclusive_rights`, `credit_required`, `created_at`, `updated_at`) VALUES
(1, 'b942ab2b-397f-11f1-b001-54ee759c7d1b', '70ab35e4-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 29.99, 24.99, 1, 10000, 1, 1, 0, 0, 0, 0, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(2, 'b94417b5-397f-11f1-b001-54ee759c7d1b', '70ab35e4-3979-11f1-b001-54ee759c7d1b', '408092e1-396a-11f1-b001-54ee759c7d1b', 99.99, 79.99, 1, 500000, 5, 5, 0, 0, 1, 1000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(3, 'b9441ea1-397f-11f1-b001-54ee759c7d1b', '70ab35e4-3979-11f1-b001-54ee759c7d1b', '4f563113-396a-11f1-b001-54ee759c7d1b', 299.99, 249.99, 1, NULL, NULL, 50, 1, 1, 1, 10000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(4, 'b9442202-397f-11f1-b001-54ee759c7d1b', '70bcd495-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 34.99, 29.99, 1, 10000, 1, 1, 0, 0, 0, 0, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(5, 'b9442a29-397f-11f1-b001-54ee759c7d1b', '70bcd495-3979-11f1-b001-54ee759c7d1b', '408092e1-396a-11f1-b001-54ee759c7d1b', 119.99, 99.99, 1, 500000, 5, 5, 0, 0, 1, 1000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(6, 'b9442dd7-397f-11f1-b001-54ee759c7d1b', '70bcd495-3979-11f1-b001-54ee759c7d1b', '4f563113-396a-11f1-b001-54ee759c7d1b', 399.99, 349.99, 1, NULL, NULL, 100, 1, 1, 1, 25000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(7, 'b9443374-397f-11f1-b001-54ee759c7d1b', '70be9a3a-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 24.99, 19.99, 1, 10000, 1, 1, 0, 0, 0, 0, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(8, 'b9443a78-397f-11f1-b001-54ee759c7d1b', '70be9a3a-3979-11f1-b001-54ee759c7d1b', '408092e1-396a-11f1-b001-54ee759c7d1b', 89.99, 74.99, 1, 500000, 5, 5, 0, 0, 1, 1000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(9, 'b9443deb-397f-11f1-b001-54ee759c7d1b', '70be9a3a-3979-11f1-b001-54ee759c7d1b', '4f563113-396a-11f1-b001-54ee759c7d1b', 249.99, 199.99, 1, NULL, NULL, 50, 1, 1, 1, 10000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(10, 'b9444206-397f-11f1-b001-54ee759c7d1b', '70be9ee6-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 39.99, 34.99, 1, 10000, 1, 1, 0, 0, 0, 0, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(11, 'b94445b7-397f-11f1-b001-54ee759c7d1b', '70be9ee6-3979-11f1-b001-54ee759c7d1b', '408092e1-396a-11f1-b001-54ee759c7d1b', 149.99, 129.99, 1, 500000, 5, 5, 0, 0, 1, 1000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(12, 'b9444a16-397f-11f1-b001-54ee759c7d1b', '70be9ee6-3979-11f1-b001-54ee759c7d1b', '4f563113-396a-11f1-b001-54ee759c7d1b', 499.99, 449.99, 1, NULL, NULL, 200, 1, 1, 1, 50000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(13, 'b9444e3b-397f-11f1-b001-54ee759c7d1b', '70bea299-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 27.99, 22.99, 1, 10000, 1, 1, 0, 0, 0, 0, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(14, 'b944524a-397f-11f1-b001-54ee759c7d1b', '70bea299-3979-11f1-b001-54ee759c7d1b', '408092e1-396a-11f1-b001-54ee759c7d1b', 94.99, 79.99, 1, 500000, 5, 5, 0, 0, 1, 1000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(15, 'b9445633-397f-11f1-b001-54ee759c7d1b', '70bea299-3979-11f1-b001-54ee759c7d1b', '4f563113-396a-11f1-b001-54ee759c7d1b', 279.99, 229.99, 1, NULL, NULL, 75, 1, 1, 1, 15000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(16, 'b9445baf-397f-11f1-b001-54ee759c7d1b', '70bea5f0-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 29.99, 24.99, 1, 10000, 1, 1, 0, 0, 0, 0, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(17, 'b9445fed-397f-11f1-b001-54ee759c7d1b', '70bea5f0-3979-11f1-b001-54ee759c7d1b', '408092e1-396a-11f1-b001-54ee759c7d1b', 99.99, 84.99, 1, 500000, 5, 5, 0, 0, 1, 1000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(18, 'b94463b6-397f-11f1-b001-54ee759c7d1b', '70bea5f0-3979-11f1-b001-54ee759c7d1b', '4f563113-396a-11f1-b001-54ee759c7d1b', 299.99, 249.99, 1, NULL, NULL, 50, 1, 1, 1, 10000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(19, 'b944684a-397f-11f1-b001-54ee759c7d1b', '70c11d07-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 34.99, 29.99, 1, 10000, 1, 1, 0, 0, 0, 0, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(20, 'b9446b89-397f-11f1-b001-54ee759c7d1b', '70c11d07-3979-11f1-b001-54ee759c7d1b', '408092e1-396a-11f1-b001-54ee759c7d1b', 129.99, 109.99, 1, 500000, 5, 5, 0, 0, 1, 1000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(21, 'b944721e-397f-11f1-b001-54ee759c7d1b', '70c11d07-3979-11f1-b001-54ee759c7d1b', '4f563113-396a-11f1-b001-54ee759c7d1b', 449.99, 399.99, 1, NULL, NULL, 150, 1, 1, 1, 30000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(22, 'b9447699-397f-11f1-b001-54ee759c7d1b', '70c12128-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 32.99, 27.99, 1, 10000, 1, 1, 0, 0, 0, 0, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(23, 'b9447b0a-397f-11f1-b001-54ee759c7d1b', '70c12128-3979-11f1-b001-54ee759c7d1b', '408092e1-396a-11f1-b001-54ee759c7d1b', 109.99, 89.99, 1, 500000, 5, 5, 0, 0, 1, 1000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(24, 'b9447faf-397f-11f1-b001-54ee759c7d1b', '70c12128-3979-11f1-b001-54ee759c7d1b', '4f563113-396a-11f1-b001-54ee759c7d1b', 349.99, 299.99, 1, NULL, NULL, 100, 1, 1, 1, 20000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(25, 'b944849b-397f-11f1-b001-54ee759c7d1b', '70c125b2-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 29.99, 24.99, 1, 10000, 1, 1, 0, 0, 0, 0, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(26, 'b9448894-397f-11f1-b001-54ee759c7d1b', '70c125b2-3979-11f1-b001-54ee759c7d1b', '408092e1-396a-11f1-b001-54ee759c7d1b', 99.99, 84.99, 1, 500000, 5, 5, 0, 0, 1, 1000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(27, 'b9448ac1-397f-11f1-b001-54ee759c7d1b', '70c125b2-3979-11f1-b001-54ee759c7d1b', '4f563113-396a-11f1-b001-54ee759c7d1b', 299.99, 249.99, 1, NULL, NULL, 75, 1, 1, 1, 15000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(28, 'b9448efc-397f-11f1-b001-54ee759c7d1b', '70c4e894-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 44.99, 39.99, 1, 10000, 1, 1, 0, 0, 0, 0, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(29, 'b944930b-397f-11f1-b001-54ee759c7d1b', '70c4e894-3979-11f1-b001-54ee759c7d1b', '408092e1-396a-11f1-b001-54ee759c7d1b', 169.99, 149.99, 1, 500000, 5, 5, 0, 0, 1, 1000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(30, 'b9449653-397f-11f1-b001-54ee759c7d1b', '70c4e894-3979-11f1-b001-54ee759c7d1b', '4f563113-396a-11f1-b001-54ee759c7d1b', 599.99, 549.99, 1, NULL, NULL, 250, 1, 1, 1, 100000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(31, 'b9449a94-397f-11f1-b001-54ee759c7d1b', '70c4f149-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 31.99, 26.99, 1, 10000, 1, 1, 0, 0, 0, 0, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(32, 'b9449dbd-397f-11f1-b001-54ee759c7d1b', '70c4f149-3979-11f1-b001-54ee759c7d1b', '408092e1-396a-11f1-b001-54ee759c7d1b', 104.99, 89.99, 1, 500000, 5, 5, 0, 0, 1, 1000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(33, 'b944a17e-397f-11f1-b001-54ee759c7d1b', '70c4f149-3979-11f1-b001-54ee759c7d1b', '4f563113-396a-11f1-b001-54ee759c7d1b', 329.99, 279.99, 1, NULL, NULL, 80, 1, 1, 1, 12000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(34, 'b944a4c3-397f-11f1-b001-54ee759c7d1b', '70c4f6d9-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 22.99, 18.99, 1, 10000, 1, 1, 0, 0, 0, 0, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(35, 'b944a863-397f-11f1-b001-54ee759c7d1b', '70c4f6d9-3979-11f1-b001-54ee759c7d1b', '408092e1-396a-11f1-b001-54ee759c7d1b', 79.99, 64.99, 1, 500000, 5, 5, 0, 0, 1, 1000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35'),
(36, 'b944ab6b-397f-11f1-b001-54ee759c7d1b', '70c4f6d9-3979-11f1-b001-54ee759c7d1b', '4f563113-396a-11f1-b001-54ee759c7d1b', 199.99, 159.99, 1, NULL, NULL, 30, 1, 1, 1, 5000, 0, 1, '2026-04-16 10:33:35', '2026-04-16 10:33:35');

-- --------------------------------------------------------

--
-- Table structure for table `beat_likes`
--

CREATE TABLE `beat_likes` (
  `id` int NOT NULL,
  `uuid` varchar(50) DEFAULT NULL,
  `beat_uuid` varchar(36) NOT NULL,
  `visitor_id` varchar(64) NOT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `beat_likes`
--

INSERT INTO `beat_likes` (`id`, `uuid`, `beat_uuid`, `visitor_id`, `ip_address`, `created_at`) VALUES
(1, 'a9423b4a-4df6-4f17-9419-431e1b7dfc1a', '70ab35e4-3979-11f1-b001-54ee759c7d1b', '1374a75f8cf6bc29ce1b50d542692df3', '::1', '2026-04-17 11:35:55'),
(5, '3ca50232-33c3-48a6-a3f0-79f33969e93d', '70bcd495-3979-11f1-b001-54ee759c7d1b', '1374a75f8cf6bc29ce1b50d542692df3', '::1', '2026-04-17 11:44:34');

-- --------------------------------------------------------

--
-- Table structure for table `download_logs`
--

CREATE TABLE `download_logs` (
  `id` int NOT NULL,
  `uuid` varchar(50) DEFAULT NULL,
  `user_license_uuid` varchar(50) NOT NULL,
  `ip_address` varchar(100) DEFAULT NULL,
  `location` varchar(100) DEFAULT NULL,
  `user_agent` text,
  `downloaded_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `download_logs`
--

INSERT INTO `download_logs` (`id`, `uuid`, `user_license_uuid`, `ip_address`, `location`, `user_agent`, `downloaded_at`) VALUES
(1, '1f31a3c6-3982-11f1-b001-54ee759c7d1b', '8da8f49d-3981-11f1-b001-54ee759c7d1b', '192.168.1.100', 'Nigeria, Onitsha South', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', '2026-04-16 10:50:45');

-- --------------------------------------------------------

--
-- Table structure for table `license_tiers`
--

CREATE TABLE `license_tiers` (
  `id` int NOT NULL,
  `uuid` varchar(50) DEFAULT NULL,
  `name` varchar(50) NOT NULL,
  `display_name` varchar(100) NOT NULL,
  `sort_order` int DEFAULT '0',
  `description` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `license_tiers`
--

INSERT INTO `license_tiers` (`id`, `uuid`, `name`, `display_name`, `sort_order`, `description`, `created_at`) VALUES
(1, '376ba2f1-396a-11f1-b001-54ee759c7d1b', 'basic', 'Basic License', 1, 'For independent artists and small projects', '2026-04-16 07:57:16'),
(2, '408092e1-396a-11f1-b001-54ee759c7d1b', 'standard', 'Standard License', 2, 'For commercial releases and larger audiences', '2026-04-16 07:57:16'),
(3, '4f563113-396a-11f1-b001-54ee759c7d1b', 'unlimited', 'Unlimited License', 3, 'Full rights for unlimited commercial use', '2026-04-16 07:57:16');

-- --------------------------------------------------------

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` int NOT NULL,
  `uuid` varchar(50) DEFAULT NULL,
  `user_uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `order_number` varchar(50) NOT NULL,
  `customer_email` varchar(255) NOT NULL,
  `customer_name` varchar(255) DEFAULT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','paid','failed','refunded') DEFAULT 'pending',
  `payment_method` varchar(50) DEFAULT NULL,
  `payment_intent_id` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `orders`
--

INSERT INTO `orders` (`id`, `uuid`, `user_uuid`, `order_number`, `customer_email`, `customer_name`, `total_amount`, `status`, `payment_method`, `payment_intent_id`, `created_at`, `updated_at`) VALUES
(1, '3cb3b255-3980-11f1-b001-54ee759c7d1b', 'a0416b54-53ff-4511-ad0c-fcc2e45f9db4', 'ORD-20240001', 'emmanuuelbigboss26@gmail.com', 'Manuel', 29.99, 'paid', 'stripe', 'pi_1NQw2eLkd9uFvZ7q', '2026-04-16 10:37:16', '2026-04-16 10:37:16');

-- --------------------------------------------------------

--
-- Table structure for table `order_items`
--

CREATE TABLE `order_items` (
  `id` int NOT NULL,
  `uuid` varchar(50) DEFAULT NULL,
  `order_uuid` varchar(50) NOT NULL,
  `beat_uuid` varchar(50) NOT NULL,
  `license_tier_uuid` varchar(50) NOT NULL,
  `license_price` decimal(10,2) NOT NULL,
  `license_key` varchar(100) DEFAULT NULL,
  `download_count` int DEFAULT '0',
  `max_downloads` int DEFAULT NULL,
  `download_expiry` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `order_items`
--

INSERT INTO `order_items` (`id`, `uuid`, `order_uuid`, `beat_uuid`, `license_tier_uuid`, `license_price`, `license_key`, `download_count`, `max_downloads`, `download_expiry`, `created_at`) VALUES
(1, 'c2804932-3980-11f1-b001-54ee759c7d1b', '3cb3b255-3980-11f1-b001-54ee759c7d1b', '70ab35e4-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 29.99, 'LC-001-ABC-123', 2, 1, '2025-12-31 22:59:59', '2026-04-16 10:41:00');

-- --------------------------------------------------------

--
-- Table structure for table `transactions`
--

CREATE TABLE `transactions` (
  `id` int NOT NULL,
  `uuid` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `order_uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `user_uuid` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `transaction_ref` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `currency` varchar(10) COLLATE utf8mb4_general_ci DEFAULT 'USD',
  `status` enum('pending','success','failed','refunded') COLLATE utf8mb4_general_ci DEFAULT 'pending',
  `payment_gateway` varchar(50) COLLATE utf8mb4_general_ci DEFAULT 'paypal',
  `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ;

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int NOT NULL,
  `uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `username` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `fullname` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `password` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `email` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `phone` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `photo` varchar(200) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `temp_code` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `temp_validation` datetime DEFAULT NULL,
  `temp_token` varchar(100) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` enum('verified','pending','failed') COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pending',
  `roles` enum('seeker','admin') COLLATE utf8mb4_general_ci DEFAULT 'seeker',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `uuid`, `username`, `fullname`, `password`, `email`, `phone`, `photo`, `temp_code`, `temp_validation`, `temp_token`, `status`, `roles`, `created_at`) VALUES
(1, 'a0416b54-53ff-4511-ad0c-fcc2e45f9db4', 'Hack', 'Somtochi Nweke', '$2y$10$5Nf04v5nfeuMP9YfiYDQO.1OzJgdlhZsidk38i00jgAAWORLRT4O.', 'emmanuelbigboss26@gmail.com', '+2346975860', 'uploads/profile/profile_692a129b2f3ee0.58700473.jpg', NULL, NULL, NULL, 'pending', 'seeker', '2025-11-27 14:29:40');

-- --------------------------------------------------------

--
-- Table structure for table `user_licenses`
--

CREATE TABLE `user_licenses` (
  `id` int NOT NULL,
  `uuid` varchar(50) DEFAULT NULL,
  `user_uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `order_item_uuid` varchar(50) NOT NULL,
  `beat_uuid` varchar(50) NOT NULL,
  `license_tier_uuid` varchar(50) NOT NULL,
  `license_key` varchar(100) NOT NULL,
  `purchase_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `expires_at` timestamp NULL DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `last_downloaded_at` timestamp NULL DEFAULT NULL,
  `download_count` int DEFAULT '0',
  `streams_used` int DEFAULT '0',
  `max_streams` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `user_licenses`
--

INSERT INTO `user_licenses` (`id`, `uuid`, `user_uuid`, `order_item_uuid`, `beat_uuid`, `license_tier_uuid`, `license_key`, `purchase_date`, `expires_at`, `is_active`, `last_downloaded_at`, `download_count`, `streams_used`, `max_streams`, `created_at`) VALUES
(1, '8da8f49d-3981-11f1-b001-54ee759c7d1b', 'a0416b54-53ff-4511-ad0c-fcc2e45f9db4', 'c2804932-3980-11f1-b001-54ee759c7d1b', '70ab35e4-3979-11f1-b001-54ee759c7d1b', '376ba2f1-396a-11f1-b001-54ee759c7d1b', 'LC-001-ABC-123', '2024-01-15 09:30:00', '2025-12-31 22:59:59', 1, '2024-02-20 13:23:00', 2, 3500, 10000, '2026-04-16 10:46:41');

-- --------------------------------------------------------

--
-- Table structure for table `user_logs`
--

CREATE TABLE `user_logs` (
  `id` int NOT NULL,
  `uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `user_uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `activity` varchar(200) DEFAULT NULL,
  `ip_address` varchar(100) DEFAULT NULL,
  `device` varchar(100) DEFAULT NULL,
  `location` varchar(100) DEFAULT NULL,
  `status` enum('success','failed','info','pending') NOT NULL DEFAULT 'success',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `beats`
--
ALTER TABLE `beats`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `slug` (`slug`),
  ADD UNIQUE KEY `uuid` (`uuid`),
  ADD UNIQUE KEY `uuid_2` (`uuid`);

--
-- Indexes for table `beat_licenses`
--
ALTER TABLE `beat_licenses`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `beat_uuid` (`beat_uuid`,`license_tier_uuid`),
  ADD UNIQUE KEY `unique` (`uuid`),
  ADD KEY `liecse_teir_h4` (`license_tier_uuid`);

--
-- Indexes for table `beat_likes`
--
ALTER TABLE `beat_likes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_like` (`beat_uuid`,`visitor_id`),
  ADD UNIQUE KEY `unique` (`uuid`);

--
-- Indexes for table `download_logs`
--
ALTER TABLE `download_logs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique` (`uuid`),
  ADD KEY `download_user_logs_ue7e` (`user_license_uuid`);

--
-- Indexes for table `license_tiers`
--
ALTER TABLE `license_tiers`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name` (`name`),
  ADD UNIQUE KEY `uuid` (`uuid`);

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `order_number` (`order_number`),
  ADD UNIQUE KEY `hwuwk` (`uuid`),
  ADD KEY `user_uuid_eur34r` (`user_uuid`);

--
-- Indexes for table `order_items`
--
ALTER TABLE `order_items`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `license_key` (`license_key`),
  ADD UNIQUE KEY `uejaque` (`uuid`),
  ADD KEY `orders+uuid_eu3t` (`order_uuid`),
  ADD KEY `user_hew_beat` (`beat_uuid`),
  ADD KEY `liceense_tier_uuide_43jf` (`license_tier_uuid`);

--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_uid-wj4e` (`user_uuid`),
  ADD KEY `order_heiw3gv` (`order_uuid`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uuid` (`uuid`);

--
-- Indexes for table `user_licenses`
--
ALTER TABLE `user_licenses`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `license_key` (`license_key`),
  ADD UNIQUE KEY `uqieque` (`uuid`),
  ADD KEY `user_ur3f` (`user_uuid`),
  ADD KEY `beat_yw34f` (`beat_uuid`),
  ADD KEY `linecsne_tega43f` (`license_tier_uuid`),
  ADD KEY `order_items_3h4cf` (`order_item_uuid`);

--
-- Indexes for table `user_logs`
--
ALTER TABLE `user_logs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uuid` (`uuid`),
  ADD KEY `user_logs_ue7er` (`user_uuid`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `beats`
--
ALTER TABLE `beats`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `beat_licenses`
--
ALTER TABLE `beat_licenses`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;

--
-- AUTO_INCREMENT for table `beat_likes`
--
ALTER TABLE `beat_likes`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `download_logs`
--
ALTER TABLE `download_logs`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `license_tiers`
--
ALTER TABLE `license_tiers`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `order_items`
--
ALTER TABLE `order_items`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `transactions`
--
ALTER TABLE `transactions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `user_licenses`
--
ALTER TABLE `user_licenses`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `user_logs`
--
ALTER TABLE `user_logs`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `beat_licenses`
--
ALTER TABLE `beat_licenses`
  ADD CONSTRAINT `beat_iejwi4d` FOREIGN KEY (`beat_uuid`) REFERENCES `beats` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `liecse_teir_h4` FOREIGN KEY (`license_tier_uuid`) REFERENCES `license_tiers` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `beat_likes`
--
ALTER TABLE `beat_likes`
  ADD CONSTRAINT `beat_uw7a` FOREIGN KEY (`beat_uuid`) REFERENCES `beats` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `download_logs`
--
ALTER TABLE `download_logs`
  ADD CONSTRAINT `download_user_logs_ue7e` FOREIGN KEY (`user_license_uuid`) REFERENCES `user_licenses` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `orders`
--
ALTER TABLE `orders`
  ADD CONSTRAINT `user_uuid_eur34r` FOREIGN KEY (`user_uuid`) REFERENCES `users` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `order_items`
--
ALTER TABLE `order_items`
  ADD CONSTRAINT `liceense_tier_uuide_43jf` FOREIGN KEY (`license_tier_uuid`) REFERENCES `license_tiers` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `orders+uuid_eu3t` FOREIGN KEY (`order_uuid`) REFERENCES `orders` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `user_hew_beat` FOREIGN KEY (`beat_uuid`) REFERENCES `beats` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `transactions`
--
ALTER TABLE `transactions`
  ADD CONSTRAINT `order_heiw3gv` FOREIGN KEY (`order_uuid`) REFERENCES `orders` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `user_uid-wj4e` FOREIGN KEY (`user_uuid`) REFERENCES `users` (`uuid`) ON DELETE RESTRICT ON UPDATE RESTRICT;

--
-- Constraints for table `user_licenses`
--
ALTER TABLE `user_licenses`
  ADD CONSTRAINT `beat_yw34f` FOREIGN KEY (`beat_uuid`) REFERENCES `beats` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `linecsne_tega43f` FOREIGN KEY (`license_tier_uuid`) REFERENCES `license_tiers` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `order_items_3h4cf` FOREIGN KEY (`order_item_uuid`) REFERENCES `order_items` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `user_ur3f` FOREIGN KEY (`user_uuid`) REFERENCES `users` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `user_logs`
--
ALTER TABLE `user_logs`
  ADD CONSTRAINT `user_logs_ue7er` FOREIGN KEY (`user_uuid`) REFERENCES `users` (`uuid`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
