-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 01, 2026 at 10:33 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

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: `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 `projects`
--

CREATE TABLE `projects` (
  `id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `client` varchar(255) NOT NULL,
  `progress` int(3) DEFAULT 0,
  `total_cost` decimal(10,2) DEFAULT 0.00,
  `advance_payment` decimal(10,2) DEFAULT 0.00,
  `status` enum('Active','Completed','Cancelling','Paused') DEFAULT 'Active',
  `scope` text DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `image_path` varchar(255) DEFAULT NULL,
  `doc_stage` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `projects`
--

INSERT INTO `projects` (`id`, `title`, `client`, `progress`, `total_cost`, `advance_payment`, `status`, `scope`, `start_date`, `end_date`, `email`, `password`, `image_path`, `doc_stage`) VALUES
(1, '3D Interactive Portfolio', 'Costa Landside', 75, 1200.00, 600.00, 'Active', 'High-end 3D website with Three.js integration and GSAP animations.', '2026-03-01', '2026-04-15', NULL, NULL, NULL, 0),
(2, 'Digital DAM Platform', 'X DAM Architecture', 40, 3500.00, 1500.00, 'Active', 'Development of a custom Digital Asset Management system for architectural renders.', '2026-02-15', '2026-05-20', NULL, NULL, NULL, 0),
(3, 'E-commerce Rebrand', 'Nilmaz Beauty', 100, 800.00, 800.00, 'Completed', 'Full website redesign and seasonal festival brochure design.', '2026-01-10', '2026-03-05', NULL, NULL, NULL, 0),
(4, 'Mobile App Concept', 'TechVanguard', 10, 5000.00, 1000.00, 'Cancelling', 'Initial UI/UX prototyping for a fintech mobile application.', '2026-03-10', '2026-08-01', '', '', 'uploads/1775062964_1000054697.png', 0);

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

--
-- 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 `projects`
--
ALTER TABLE `projects`
  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 `projects`
--
ALTER TABLE `projects`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- 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;

/*!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 */;
