-- MariaDB dump 10.19  Distrib 10.5.9-MariaDB, for osx10.16 (x86_64)
--
-- Host: localhost    Database: payments
-- ------------------------------------------------------
-- Server version	10.5.9-MariaDB

/*!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 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `c2bTransactions`
--

DROP TABLE IF EXISTS `c2bTransactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `c2bTransactions` (
  `transactionID` int(11) NOT NULL AUTO_INCREMENT,
  `paybillID` int(11) DEFAULT 0,
  `TransactionType` varchar(30) NOT NULL,
  `TransID` varchar(30) NOT NULL,
  `TransTime` varchar(20) NOT NULL,
  `TransAmount` float NOT NULL,
  `BusinessShortCode` varchar(20) NOT NULL,
  `BillRefNumber` varchar(20) NOT NULL,
  `InvoiceNumber` varchar(20) NOT NULL,
  `OrgAccountBalance` float NOT NULL,
  `ThirdPartyTransID` varchar(20) NOT NULL,
  `MSISDN` bigint(15) NOT NULL,
  `FirstName` varchar(20) NOT NULL,
  `MiddleName` varchar(20) NOT NULL,
  `LastName` varchar(20) NOT NULL,
  `status` int(11) NOT NULL DEFAULT 0,
  `Processed` int(11) DEFAULT 0,
  `createdBy` int(11) NOT NULL DEFAULT 1,
  `updatedBy` int(11) NOT NULL DEFAULT 1,
  `dateCreated` datetime NOT NULL,
  `dateModified` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`transactionID`),
  UNIQUE KEY `TransID` (`TransID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `c2bTransactions`
--

LOCK TABLES `c2bTransactions` WRITE;
/*!40000 ALTER TABLE `c2bTransactions` DISABLE KEYS */;
/*!40000 ALTER TABLE `c2bTransactions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `c2b_requests`
--

DROP TABLE IF EXISTS `c2b_requests`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `c2b_requests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `msisdn` varchar(15) NOT NULL,
  `amount` float NOT NULL,
  `ref` varchar(100) NOT NULL,
  `callback_url` varchar(200) DEFAULT NULL,
  `mpesa_ref` varchar(20) DEFAULT NULL,
  `narration` varchar(200) DEFAULT NULL,
  `checkout_id` varchar(100) NOT NULL,
  `status` int(11) NOT NULL,
  `date_created` datetime NOT NULL,
  `date_modified` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `c2b_requests`
--

LOCK TABLES `c2b_requests` WRITE;
/*!40000 ALTER TABLE `c2b_requests` DISABLE KEYS */;
INSERT INTO `c2b_requests` VALUES (1,'254725671644',10000,'343048914708','','','The balance is insufficient for the transaction','ws_CO_29112021111400640808',3,'2021-11-29 11:14:00','2021-11-29 08:51:52');
/*!40000 ALTER TABLE `c2b_requests` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `mpesa_b2c_requests`
--

DROP TABLE IF EXISTS `mpesa_b2c_requests`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mpesa_b2c_requests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mobile_number` bigint(15) NOT NULL,
  `user_id` int(11) NOT NULL,
  `amount` float NOT NULL,
  `status` int(11) NOT NULL,
  `date_created` datetime NOT NULL,
  `date_modified` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `mpesa_ref` varchar(30) DEFAULT NULL,
  `narration` varchar(200) DEFAULT NULL,
  `external_reference` varchar(100) NOT NULL,
  `conversation_id` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `external_reference` (`external_reference`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `mpesa_b2c_requests`
--

LOCK TABLES `mpesa_b2c_requests` WRITE;
/*!40000 ALTER TABLE `mpesa_b2c_requests` DISABLE KEYS */;
/*!40000 ALTER TABLE `mpesa_b2c_requests` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `mpesa_b2c_transaction_results`
--

DROP TABLE IF EXISTS `mpesa_b2c_transaction_results`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mpesa_b2c_transaction_results` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `OriginatorConversationID` varchar(100) NOT NULL,
  `ConversationID` varchar(100) NOT NULL,
  `TransactionID` varchar(100) DEFAULT NULL,
  `TransactionAmount` float DEFAULT NULL,
  `TransactionReceipt` varchar(100) DEFAULT NULL,
  `ReceiverPartyPublicName` varchar(100) DEFAULT NULL,
  `TransactionCompletedDateTime` varchar(30) DEFAULT NULL,
  `B2CUtilityAccountAvailableFunds` float DEFAULT NULL,
  `B2CWorkingAccountAvailableFunds` float DEFAULT NULL,
  `narration` varchar(200) DEFAULT NULL,
  `ResultDesc` varchar(200) NOT NULL,
  `status` int(11) NOT NULL,
  `date_created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `mpesa_b2c_transaction_results`
--

LOCK TABLES `mpesa_b2c_transaction_results` WRITE;
/*!40000 ALTER TABLE `mpesa_b2c_transaction_results` DISABLE KEYS */;
/*!40000 ALTER TABLE `mpesa_b2c_transaction_results` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2021-11-29 12:01:57
