-
Notifications
You must be signed in to change notification settings - Fork 4
DB model
nimf edited this page Jun 20, 2012
·
1 revision
Source and destination numbers` format is <number>.<TON>.<NPI> TON is (type of number) and NPI is (numbering plan identification)
-
id
int(10) unsigned NOT NULL AUTO_INCREMENT -- received SMS ID -
src
varchar(20) NOT NULL -- source number -
dst
varchar(20) NOT NULL -- destination number -
msg
varchar(2048) NOT NULL -- message body -
ts
int(10) unsigned NOT NULL DEFAULT '0' -- unix timestamp of receiving SMS -
mt
tinyint(3) unsigned NOT NULL DEFAULT '0' -- message type (0 - SMS, 4 - delivery report)
-
id
int(10) unsigned NOT NULL DEFAULT '0' -- received SMS ID -
src
varchar(20) NOT NULL -- source number -
dst
varchar(20) NOT NULL -- destination number -
msg
varchar(2048) NOT NULL -- message body -
ts
int(10) unsigned NOT NULL DEFAULT '0' -- unix timestamp of receiving SMS -
mt
tinyint(3) unsigned NOT NULL DEFAULT '0' -- message type (0 - SMS, 4 - delivery report) -
proc_ts
int(10) unsigned NOT NULL DEFAULT '0' -- unix timestamp of processing this SMS by some service -
resp_id
int(10) unsigned NOT NULL DEFAULT '0' -- ID of response SMS, created by service. If any -
srv_id
tinyint(3) unsigned NOT NULL DEFAULT '0' -- ID of the service, which processed this SMS -
rslt
tinyint(3) NOT NULL DEFAULT '0' -- ID of processing result
-
id
int(10) unsigned NOT NULL AUTO_INCREMENT -- sent SMS ID -
rel_id
int(10) unsigned NOT NULL DEFAULT '0' -- related SMS (i. e. if it is a response to some received SMS). If any -
src
varchar(20) NOT NULL -- source number -
dst
varchar(20) NOT NULL -- destination number -
msg
varchar(2048) NOT NULL -- message body -
ts
int(10) unsigned NOT NULL DEFAULT '0' -- unix timestamp of putting this SMS into outbox -
rd
tinyint(3) unsigned NOT NULL DEFAULT '0' -- request delivery (0 - no, 1 - yes) -
try_ts
int(11) unsigned NOT NULL DEFAULT '0' -- unix timestamp of last sending attempt
-
id
int(10) unsigned NOT NULL DEFAULT '0' -- sent SMS ID -
rel_id
int(10) unsigned NOT NULL DEFAULT '0' -- related SMS (i. e. if it is a response to some received SMS). If any -
src
varchar(20) NOT NULL -- source number -
dst
varchar(20) NOT NULL -- destination number -
msg
varchar(2048) NOT NULL -- message body -
ts
int(10) unsigned NOT NULL DEFAULT '0' -- unix timestamp of putting this SMS into outbox -
rd
tinyint(3) unsigned NOT NULL DEFAULT '0' -- request delivery (0 - no, 1 - yes) -
snt_ts
int(10) unsigned NOT NULL DEFAULT '0' -- unix timestamp of sending SMS -
msg_id
varchar(50) NOT NULL DEFAULT '' -- message ID from SMSC -
dl_ts
int(10) unsigned DEFAULT NULL -- unix timestamp of SMS delivery (from delivery report) -
dl_stat
tinyint(3) unsigned DEFAULT NULL -- delivery status
-
src
char(20) NOT NULL -- source number -
dst
char(20) NOT NULL -- destination number -
msg
char(255) NOT NULL -- message part body -
ts
int(10) unsigned NOT NULL DEFAULT '0' -- unix timestamp of receiving this part -
ref
smallint(6) unsigned NOT NULL -- reference (for identifying parts of SMS) -
pn
tinyint(4) unsigned NOT NULL -- part number -
tp
tinyint(4) unsigned NOT NULL -- total parts count
-
id
int(11) unsigned NOT NULL -- service ID (you define) -
name
char(255) NOT NULL -- service name -
exported_id
int(11) unsigned NOT NULL -- for data extractions. optional
-
srv_id
int(11) unsigned NOT NULL -- service ID -
code
tinyint(3) NOT NULL DEFAULT '0' -- numeric result code (you define) -
dsc
char(255) NOT NULL -- description
-
ts
int(11) unsigned NOT NULL DEFAULT '0' -- unix timestamp -
rec
int(11) unsigned NOT NULL DEFAULT '0' -- received SMS count -
sent
int(11) unsigned NOT NULL DEFAULT '0' -- sent SMS count