-- Database Export Class-----------------
-- Database Name smsgateway-----------------
-- Class Created BY Very Shafrudin---------------
-- Struktur Tabel admin --------------------
CREATE TABLE IF NOT EXISTS `admin` (
`nomor` varchar(30) NOT NULL ,
`nama` varchar(20) NOT NULL ,
PRIMARY KEY (`nomor`)
);
-- Struktur Tabel daemons --------------------
CREATE TABLE IF NOT EXISTS `daemons` (
`Start` text NOT NULL ,
`Info` text NOT NULL
);
-- Struktur Tabel gammu --------------------
CREATE TABLE IF NOT EXISTS `gammu` (
`Version` tinyint(4) NOT NULL
);
-- Struktur Tabel inbox --------------------
CREATE TABLE IF NOT EXISTS `inbox` (
`UpdatedInDB` timestamp NOT NULL ,
`ReceivingDateTime` timestamp NOT NULL ,
`Text` text NOT NULL ,
`SenderNumber` varchar(20) NOT NULL ,
`Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL ,
`UDH` text NOT NULL ,
`SMSCNumber` varchar(20) NOT NULL ,
`Class` int(11) NOT NULL ,
`TextDecoded` varchar(160) NOT NULL ,
`ID` int(11) unsigned NOT NULL auto_increment,
`RecipientID` text NOT NULL ,
`Processed` enum('false','true') NOT NULL ,
UNIQUE KEY `ID` (`ID`)
);
-- Struktur Tabel outbox --------------------
CREATE TABLE IF NOT EXISTS `outbox` (
`UpdatedInDB` timestamp NOT NULL ,
`InsertIntoDB` timestamp NOT NULL ,
`SendingDateTime` timestamp NOT NULL ,
`Text` text NULL ,
`DestinationNumber` varchar(20) NOT NULL ,
`Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NULL ,
`UDH` text NULL ,
`Class` int(11) NULL ,
`TextDecoded` varchar(160) NOT NULL ,
`ID` int(11) unsigned NOT NULL auto_increment,
`MultiPart` enum('false','true') NULL ,
`RelativeValidity` int(11) NULL ,
`SenderID` text NULL ,
`SendingTimeOut` timestamp NULL ,
`DeliveryReport` enum('default','yes','no') NULL ,
`CreatorID` text NOT NULL ,
UNIQUE KEY `ID` (`ID`)
);
-- Struktur Tabel outbox_multipart --------------------
CREATE TABLE IF NOT EXISTS `outbox_multipart` (
`Text` text NULL ,
`Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NULL ,
`UDH` text NULL ,
`Class` int(11) NULL ,
`TextDecoded` varchar(160) NULL ,
`ID` int(11) unsigned NOT NULL ,
`SequencePosition` int(11) NOT NULL
);
-- Struktur Tabel pbk --------------------
CREATE TABLE IF NOT EXISTS `pbk` (
`GroupID` int(11) NOT NULL ,
`Name` text NOT NULL ,
`Number` text NOT NULL
);
-- Struktur Tabel pbk_groups --------------------
CREATE TABLE IF NOT EXISTS `pbk_groups` (
`Name` text NOT NULL ,
`ID` int(11) NOT NULL auto_increment ,
UNIQUE KEY `ID` (`ID`)
);
-- Struktur Tabel pemberitahuan --------------------
CREATE TABLE IF NOT EXISTS `pemberitahuan` (
`id` bigint(20) NOT NULL auto_increment,
`waktu` datetime NOT NULL ,
PRIMARY KEY (`id`)
);
-- Struktur Tabel phones --------------------
CREATE TABLE IF NOT EXISTS `phones` (
`ID` text NOT NULL ,
`UpdatedInDB` timestamp NOT NULL ,
`InsertIntoDB` timestamp NOT NULL ,
`TimeOut` timestamp NOT NULL ,
`Send` enum('yes','no') NOT NULL ,
`Receive` enum('yes','no') NOT NULL ,
`IMEI` text NOT NULL ,
`Client` text NOT NULL
);
-- Struktur Tabel sentitems --------------------
CREATE TABLE IF NOT EXISTS `sentitems` (
`UpdatedInDB` timestamp NOT NULL ,
`InsertIntoDB` timestamp NOT NULL ,
`SendingDateTime` timestamp NOT NULL ,
`DeliveryDateTime` timestamp NOT NULL ,
`Text` text NOT NULL ,
`DestinationNumber` varchar(20) NOT NULL ,
`Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL ,
`UDH` text NOT NULL ,
`SMSCNumber` varchar(20) NOT NULL ,
`Class` int(11) NOT NULL ,
`TextDecoded` varchar(160) NOT NULL ,
`ID` int(11) unsigned NOT NULL ,
`SenderID` text NOT NULL ,
`SequencePosition` int(11) NOT NULL ,
`Status` enum('SendingOK','SendingOKNoReport','SendingError','DeliveryOK','DeliveryFailed','DeliveryPending','DeliveryUnknown','Error') NOT NULL ,
`StatusError` int(11) NOT NULL ,
`TPMR` int(11) NOT NULL ,
`RelativeValidity` int(11) NOT NULL ,
`CreatorID` text NOT NULL
);
-- Struktur Tabel t_user --------------------
CREATE TABLE IF NOT EXISTS `t_user` (
`username` varchar(30) NOT NULL ,
`password` varchar(50) NOT NULL ,
`level` tinyint(4) NOT NULL
);
|