-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `bonzo`
--

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

--
-- Table structure for table `feedback`
--

CREATE TABLE `feedback` (
  `id` int(11) NOT NULL,
  `project_id` int(11) DEFAULT NULL,
  `client_name` varchar(255) DEFAULT NULL,
  `comment` text DEFAULT NULL,
  `rating` int(1) DEFAULT 5
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `feedback`
--

INSERT INTO `feedback` (`id`, `project_id`, `client_name`, `comment`, `rating`) VALUES
(1, 3, 'Nilmaz Management', 'The Eid-themed brochure was stunning. Excellent work on the festive lighting effects!', 5),
(2, 1, 'Costa Lead', 'Really impressed with the 3D carousel. Can we make the glass blur slightly more opaque?', 4);

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

--
-- Table structure for table `finances`
--

CREATE TABLE `finances` (
  `id` int(11) NOT NULL,
  `project_id` int(11) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `earned_at` datetime DEFAULT current_timestamp(),
  `description` varchar(255) DEFAULT NULL,
  `screenshot_path` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `finances`
--

INSERT INTO `finances` (`id`, `project_id`, `amount`, `earned_at`, `description`, `screenshot_path`) VALUES
(1, NULL, 600.00, '2026-03-01 10:00:00', 'Advance for Costa Landside Project', NULL),
(2, NULL, 1500.00, '2026-02-15 14:30:00', 'Initial Deposit - X DAM Platform', NULL),
(3, NULL, 400.00, '2026-03-05 09:15:00', 'Final Settlement - Nilmaz Beauty', NULL),
(4, NULL, 1000.00, '2026-03-12 16:45:00', 'Milestone 1 Payment - TechVanguard', NULL),
(5, NULL, 250.00, '2026-03-20 11:00:00', 'Consultation Fee - Retail Hub', NULL),
(6, NULL, 600.00, '2026-04-02 01:27:40', 'Payment for: 3D Interactive Portfolio', 'uploads/payments/payment_1775075260.jpeg'),
(7, NULL, 600.00, '2026-04-02 01:30:02', 'Payment for: 3D Interactive Portfolio', 'uploads/payments/payment_1775075402.png'),
(8, NULL, 600.00, '2026-04-02 01:32:15', 'Payment for: 3D Interactive Portfolio', 'uploads/payments/payment_1775075535.jpeg');

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

--
-- Table structure for table `tasks`
--

CREATE TABLE `tasks` (
  `id` int(11) NOT NULL,
  `project_id` int(11) DEFAULT NULL,
  `description` text NOT NULL,
  `status` enum('Pending','In Progress','Completed') DEFAULT 'Pending',
  `due_date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tasks`
--

INSERT INTO `tasks` (`id`, `project_id`, `description`, `status`, `due_date`) VALUES
(1, 1, 'Optimize 3D models for mobile performance', 'In Progress', '2026-03-28'),
(2, 1, 'Finalize GSAP scroll triggers', 'Pending', '2026-03-30'),
(3, 2, 'Configure domain alias and SSL', 'Completed', '2026-03-15'),
(4, 2, 'Develop secure user authentication module', 'In Progress', '2026-04-05'),
(5, 4, 'Conduct initial client offboarding meeting', 'Pending', '2026-03-25');

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

--
-- Table structure for table `team`
--

CREATE TABLE `team` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `role` varchar(100) NOT NULL,
  `specialties` text DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `image_path` varchar(255) DEFAULT 'assets/team/default.jpg',
  `status` enum('Active','Away','On Project') DEFAULT 'Active',
  `joined_at` date DEFAULT curdate()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `team`
--

INSERT INTO `team` (`id`, `name`, `role`, `specialties`, `email`, `image_path`, `status`, `joined_at`) VALUES
(1, 'Ray', 'Lead Web Developer & Founder', 'Three.js, React, Backend Architecture', 'ray@bonzo.agency', 'assets/team/ray.jpg', 'Active', '2026-04-01'),
(2, 'Sarah Chen', 'Lead 3D Artist', 'Blender, Texture Painting, GLTF Optimization', 'sarah@bonzo.agency', 'assets/team/sarah.jpg', 'On Project', '2026-04-01'),
(3, 'Marcus Vane', 'Creative Director', 'UI/UX Design, GSAP Animations, Branding', 'marcus@bonzo.agency', 'assets/team/marcus.jpg', 'Active', '2026-04-01'),
(4, 'Elena Rossi', 'Account Manager', 'Client Relations, Project Scoping, Strategy', 'elena@bonzo.agency', 'assets/team/elena.jpg', 'Away', '2026-04-01');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `feedback`
--
ALTER TABLE `feedback`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_id` (`project_id`);

--
-- Indexes for table `finances`
--
ALTER TABLE `finances`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tasks`
--
ALTER TABLE `tasks`
  ADD PRIMARY KEY (`id`),
  ADD KEY `project_id` (`project_id`);

--
-- Indexes for table `team`
--
ALTER TABLE `team`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `feedback`
--
ALTER TABLE `feedback`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `finances`
--
ALTER TABLE `finances`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `tasks`
--
ALTER TABLE `tasks`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `team`
--
ALTER TABLE `team`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `feedback`
--
ALTER TABLE `feedback`
  ADD CONSTRAINT `feedback_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `tasks`
--
ALTER TABLE `tasks`
  ADD CONSTRAINT `tasks_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE;
COMMIT;

