inital commit

This commit is contained in:
2026-06-19 20:08:01 +06:00
commit 8a5abeeae4
13128 changed files with 3192007 additions and 0 deletions

View File

@@ -0,0 +1,423 @@
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 19, 2018 at 01:45 PM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 5.6.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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: `rtgv3`
--
-- --------------------------------------------------------
--
-- Table structure for table `crm_categories`
--
CREATE TABLE `crm_categories` (
`id` int(11) NOT NULL,
`name` varchar(150) NOT NULL COMMENT 'category name',
`created_on` date NOT NULL,
`modified_on` date NOT NULL,
`created_by` int(11) NOT NULL,
`modified_by` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `crm_categories`
--
INSERT INTO `crm_categories` (`id`, `name`, `created_on`, `modified_on`, `created_by`, `modified_by`) VALUES
(1, 'Accommodation', '2018-01-17', '0000-00-00', 2, 0),
(2, 'Accounting Fees', '2018-01-17', '0000-00-00', 2, 0);
-- --------------------------------------------------------
--
-- Table structure for table `expenses`
--
CREATE TABLE `expenses` (
`id` int(11) NOT NULL,
`type` tinyint(4) NOT NULL COMMENT '0=Payment and 1=Refund',
`category_id` int(11) NOT NULL COMMENT 'from categories table id',
`description` text NOT NULL,
`date` date NOT NULL,
`value` float NOT NULL,
`currency` varchar(50) NOT NULL,
`vat` float NOT NULL,
`project_id` int(11) NOT NULL COMMENT 'from projects table id',
`rebill` tinyint(4) NOT NULL COMMENT '0=yes and 1=no',
`receipt_reference` int(11) NOT NULL,
`invoice_id` int(11) NOT NULL COMMENT 'from invoice table id',
`attachment` varchar(255) NOT NULL,
`attachment_description` text NOT NULL,
`created_on` datetime NOT NULL,
`modified_on` datetime NOT NULL,
`created_by` int(11) NOT NULL,
`modified_by` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `expenses`
--
INSERT INTO `expenses` (`id`, `type`, `category_id`, `description`, `date`, `value`, `currency`, `vat`, `project_id`, `rebill`, `receipt_reference`, `invoice_id`, `attachment`, `attachment_description`, `created_on`, `modified_on`, `created_by`, `modified_by`) VALUES
(1, 1, 1, 'wetryui', '2018-01-17', 100, '$10', 5, 3, 0, 2, 0, 'flower_1.png', 'sfedgfhkjl', '2018-01-17 00:00:00', '2018-01-19 00:00:00', 51, 51),
(2, 0, 1, 'lorem ipsum', '2018-01-19', 266, '$20', 10, 4, 1, 2, 0, 'circle_2.jpg', 'sdfghmj', '2018-01-17 00:00:00', '2018-01-19 09:50:38', 51, 51),
(3, 1, 1, 'dfhgjhkjl', '2018-01-17', 150, '$89', 5, 9, 0, 1, 0, 'bookating-logo_3.png', 'asfdgfhj', '2018-01-17 00:00:00', '2018-01-18 00:00:00', 51, 2),
(4, 0, 2, 'dummy test', '2018-01-18', 250, '$10', 6, 2, 1, 4, 0, 'lion_4.jpg', 'nothing to say', '2018-01-18 00:00:00', '2018-01-18 00:00:00', 51, 2),
(11, 0, 1, 'sdfghjk', '2018-01-19', 100, '$80', 7, 3, 0, 2, 0, 'lion_11.jpg', 'esrdctvgbhnj', '2018-01-19 12:43:03', '2018-01-19 12:44:08', 51, 51);
-- --------------------------------------------------------
--
-- Table structure for table `invoices`
--
CREATE TABLE `invoices` (
`id` int(11) NOT NULL,
`reference` int(11) DEFAULT NULL,
`client_id` int(11) NOT NULL COMMENT 'id from client table',
`status` tinyint(4) NOT NULL COMMENT '0 = inactive & 1 = active',
`currency` decimal(10,0) NOT NULL,
`issue_date` datetime NOT NULL,
`due_date` datetime NOT NULL,
`sent_date` datetime DEFAULT NULL,
`paid_date` datetime DEFAULT NULL,
`terms` text NOT NULL,
`discount` decimal(10,0) NOT NULL,
`subscription_id` varchar(255) DEFAULT NULL,
`project_id` int(11) NOT NULL COMMENT 'id from project table',
`tax` decimal(10,0) NOT NULL,
`estimate` int(11) DEFAULT NULL,
`estimate_status` tinyint(4) DEFAULT NULL,
`etimate_accepted_date` datetime DEFAULT NULL,
`estimate_sent` varchar(150) DEFAULT NULL,
`sum` float NOT NULL,
`second_tax` decimal(10,0) NOT NULL,
`estimate_reference` varchar(150) DEFAULT NULL,
`paid` float DEFAULT NULL,
`outstanding` float DEFAULT NULL,
`created_on` datetime NOT NULL,
`modified_on` datetime NOT NULL,
`created_by` int(11) NOT NULL COMMENT 'id from cmsusers table',
`modified_by` int(11) NOT NULL COMMENT 'id from cmsusers table'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `invoices`
--
INSERT INTO `invoices` (`id`, `reference`, `client_id`, `status`, `currency`, `issue_date`, `due_date`, `sent_date`, `paid_date`, `terms`, `discount`, `subscription_id`, `project_id`, `tax`, `estimate`, `estimate_status`, `etimate_accepted_date`, `estimate_sent`, `sum`, `second_tax`, `estimate_reference`, `paid`, `outstanding`, `created_on`, `modified_on`, `created_by`, `modified_by`) VALUES
(1, NULL, 1, 1, '200', '2018-01-19 00:00:00', '2018-01-20 00:00:00', NULL, NULL, 'sdfghj', '5', NULL, 3, '5', NULL, NULL, NULL, NULL, 0, '10', NULL, NULL, NULL, '2018-01-19 11:01:20', '0000-00-00 00:00:00', 51, 0),
(2, NULL, 2, 1, '100', '2018-01-19 00:00:00', '2018-01-27 00:00:00', NULL, NULL, 'sdgfhjk', '5', NULL, 2, '7', NULL, NULL, NULL, NULL, 0, '9', NULL, NULL, NULL, '2018-01-19 11:02:12', '0000-00-00 00:00:00', 51, 0),
(3, NULL, 2, 1, '100', '2018-01-26 00:00:00', '2018-01-27 00:00:00', NULL, NULL, 'sdfgfhghjk', '4', NULL, 2, '7', NULL, NULL, NULL, NULL, 0, '9', NULL, NULL, NULL, '2018-01-19 11:02:49', '2018-01-19 11:04:42', 51, 51),
(4, NULL, 1, 1, '200', '2018-01-19 00:00:00', '2018-01-12 00:00:00', NULL, NULL, 'sdfghjk', '6', NULL, 3, '5', NULL, NULL, NULL, NULL, 0, '10', NULL, NULL, NULL, '2018-01-19 12:39:32', '2018-01-19 12:39:51', 51, 51);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `crm_categories`
--
ALTER TABLE `crm_categories`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `expenses`
--
ALTER TABLE `expenses`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `invoices`
--
ALTER TABLE `invoices`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `crm_categories`
--
ALTER TABLE `crm_categories`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `invoices`
--
ALTER TABLE `invoices`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
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 */;
--
-- Table structure for table `clients`
--
CREATE TABLE `clients` (
`id` int(11) NOT NULL,
`reference` int(11) DEFAULT NULL,
`name` varchar(40) NOT NULL,
`website` varchar(50) DEFAULT NULL,
`phone` varchar(20) DEFAULT NULL,
`mobile` varchar(20) DEFAULT NULL,
`address` varchar(100) DEFAULT NULL,
`zip_code` int(10) DEFAULT NULL,
`city` varchar(30) DEFAULT NULL,
`country` varchar(30) DEFAULT NULL,
`state` varchar(30) DEFAULT NULL,
`vat_number` varchar(50) DEFAULT NULL,
`inactive` tinyint(4) DEFAULT NULL,
`note` varchar(255) DEFAULT NULL,
`created_on` datetime NOT NULL,
`created_by` tinyint(4) NOT NULL,
`modified_on` datetime NOT NULL,
`modified_by` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32;
--
-- Table structure for table `contacts`
--
CREATE TABLE `contacts` (
`id` int(11) NOT NULL,
`company_id` tinyint(4) DEFAULT NULL,
`first_name` varchar(40) DEFAULT NULL,
`last_name` varchar(40) DEFAULT NULL,
`email` varchar(60) DEFAULT NULL,
`phone` varchar(50) DEFAULT NULL,
`mobile` varchar(50) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`zip_code` varchar(40) DEFAULT NULL,
`photo` varchar(255) DEFAULT NULL,
`city` varchar(50) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`inactive` tinyint(4) DEFAULT NULL,
`access` varchar(50) DEFAULT NULL,
`created_on` datetime NOT NULL,
`created_by` tinyint(4) NOT NULL,
`modified_on` datetime NOT NULL,
`modified_by` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32;
--
-- Table structure for table `project_categories`
--
CREATE TABLE `project_categories` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32;
--
-- Dumping data for table `project_categories`
--
INSERT INTO `project_categories` (`id`, `name`) VALUES
(1, 'It/Software'),
(2, 'Finance'),
(3, 'Electronis'),
(4, 'Networking');
--
-- Table structure for table `projects`
--
CREATE TABLE `projects` (
`id` int(11) NOT NULL,
`reference` int(11) DEFAULT NULL,
`client_id` tinyint(4) NOT NULL,
`category_id` tinyint(4) NOT NULL,
`company_id` tinyint(4) DEFAULT NULL,
`rate_per_hour` decimal(10,0) DEFAULT NULL,
`progress` decimal(10,0) DEFAULT NULL,
`project_name` varchar(50) NOT NULL,
`start_date` date NOT NULL,
`deadline` date NOT NULL,
`track` int(11) DEFAULT NULL,
`time_spent` int(11) DEFAULT NULL,
`phase` varchar(255) NOT NULL,
`description` varchar(255) DEFAULT NULL,
`progress_calculate` tinyint(4) DEFAULT NULL,
`note` varchar(255) DEFAULT NULL,
`sticky` enum('1','0') DEFAULT NULL,
`permission` int(11) NOT NULL COMMENT '0=Only show own tasks for non super admins,1=Clients can create tasks',
`enable_client_task` int(11) DEFAULT NULL,
`hide_task` int(11) DEFAULT NULL,
`created_on` datetime NOT NULL,
`created_by` tinyint(4) NOT NULL,
`modified_on` datetime NOT NULL,
`modified_by` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32;
--
-- Table structure for table `project_has_activities`
--
CREATE TABLE `project_has_activities` (
`id` int(11) NOT NULL,
`project_id` tinyint(4) DEFAULT NULL,
`user_id` tinyint(4) DEFAULT NULL,
`client_id` tinyint(4) DEFAULT NULL,
`subject` varchar(100) DEFAULT NULL,
`message` varchar(255) DEFAULT NULL,
`type` varchar(150) DEFAULT NULL,
`note` varchar(255) DEFAULT NULL,
`created_on` datetime NOT NULL,
`created_by` tinyint(4) NOT NULL,
`modified_on` datetime NOT NULL,
`modified_by` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32;
--
-- Table structure for table `project_has_filies`
--
CREATE TABLE `project_has_filies` (
`id` int(11) NOT NULL,
`project_id` tinyint(4) DEFAULT NULL,
`user_id` tinyint(4) DEFAULT NULL,
`client_id` tinyint(4) DEFAULT NULL,
`type` varchar(100) DEFAULT NULL,
`name` varchar(100) DEFAULT NULL,
`file_name` varchar(100) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`save_name` varchar(100) DEFAULT NULL,
`phase` varchar(255) DEFAULT NULL,
`download_counter` int(11) DEFAULT NULL,
`note` varchar(255) DEFAULT NULL,
`created_on` datetime NOT NULL,
`created_by` tinyint(4) NOT NULL,
`modified_on` datetime NOT NULL,
`modified_by` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32;
--
-- Table structure for table `project_has_invoices`
--
CREATE TABLE `project_has_invoices` (
`id` int(11) NOT NULL,
`project_id` tinyint(4) DEFAULT NULL,
`invoice` tinyint(4) DEFAULT NULL,
`created_on` datetime NOT NULL,
`created_by` tinyint(4) NOT NULL,
`modified_on` datetime NOT NULL,
`modified_by` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32;
--
-- Table structure for table `project_has_milestones`
--
CREATE TABLE `project_has_milestones` (
`id` int(11) NOT NULL,
`project_id` tinyint(4) NOT NULL,
`name` varchar(100) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`start_date` datetime DEFAULT NULL,
`due_date` datetime DEFAULT NULL,
`order_index` int(11) DEFAULT NULL,
`created_on` datetime NOT NULL,
`created_by` tinyint(4) NOT NULL,
`modified_on` datetime NOT NULL,
`modified_by` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32;
--
-- Table structure for table `project_has_tasks`
--
CREATE TABLE `project_has_tasks` (
`id` int(11) NOT NULL,
`project_id` tinyint(4) NOT NULL,
`user_id` tinyint(4) NOT NULL,
`name` varchar(100) DEFAULT NULL,
`status` varchar(50) DEFAULT NULL,
`type` tinyint(4) DEFAULT NULL,
`public` int(11) DEFAULT NULL,
`date_time` datetime DEFAULT NULL,
`due_time` datetime DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`value` decimal(10,0) DEFAULT NULL,
`priority` smallint(6) NOT NULL,
`client_id` int(11) NOT NULL,
`milestone_id` tinyint(4) NOT NULL,
`invoice_id` tinyint(4) NOT NULL,
`track` int(11) DEFAULT NULL,
`time_spent` int(11) DEFAULT NULL,
`milestone_order` int(11) NOT NULL,
`task_order` int(11) DEFAULT NULL,
`progress` int(11) DEFAULT NULL,
`start_date` int(11) DEFAULT NULL,
`time` int(11) DEFAULT NULL,
`note` varchar(255) DEFAULT NULL,
`created_on` datetime NOT NULL,
`created_by` tinyint(4) NOT NULL,
`modified_on` datetime NOT NULL,
`modified_by` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32;
--
-- Table structure for table `project_has_time_sheets`
--
CREATE TABLE `project_has_time_sheets` (
`id` int(11) NOT NULL,
`project_id` tinyint(4) NOT NULL,
`user_id` tinyint(4) NOT NULL,
`task_id` tinyint(4) NOT NULL,
`client_id` tinyint(4) NOT NULL,
`invoice_id` tinyint(4) NOT NULL,
`time` time DEFAULT NULL,
`start_date` datetime DEFAULT NULL,
`end_date` datetime DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`created_on` datetime NOT NULL,
`created_by` tinyint(4) NOT NULL,
`modified_on` datetime NOT NULL,
`modified_by` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32;
--
-- Table structure for table `project_has_workers`
--
CREATE TABLE `project_has_workers` (
`id` int(11) NOT NULL,
`project_id` tinyint(4) NOT NULL,
`user_id` tinyint(4) NOT NULL,
`created_on` datetime NOT NULL,
`created_by` tinyint(4) NOT NULL,
`modified_on` datetime NOT NULL,
`modified_by` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32;