Overview
Tables
Table emgp_acl
Not used
Table emgp_aclentry
Not used
Table emgp_balance_history
A record is created each time the account balance is adjusted via EMG Portal web interface or API.
Column | Description |
---|---|
id | Auto-generated unique id (primary key) |
emguser_id | Reference to emguser.id (account) |
amount_before | Account balance before top-up / change |
amount | Change |
created | Timestamp when record created |
created_by | Reference to emgp_user.id |
Table emgp_customer
Customers.
Column | Description |
---|---|
id | Auto-generated unique id (primary key) |
name | Customer name (normally company) |
created | Timestamp when record created |
created | Timestamp when record last updated |
address1 | Address row 1 |
address2 | Address row 2 |
zip | Zip code |
city | Coty |
state | State |
country | Country |
phone | Phone number |
fax | Fax number |
homepage | Home page url |
contact_admin | Contact person name (administrative) |
email_admin | Contact person e-mail |
contact_tech | Contact person name (technical) |
email_tech | Contact person e-mail |
orgno | Company registration number |
custno | Customer id |
email_report | E-mail address for account reports |
report_enabled | Account report via e-mail enabled |
Table emgp_emgaccount
Links emguser entries to a customer.
Column | Description |
---|---|
id | Auto-generated unique id (primary key) |
emguser_id | Reference to emguser.id |
customer_id | Reference to customer.id |
Table emgp_hourly_summary
Aggregated data for sent messages per account and hour.
Table is populated by “hourly_summary.pl” script which should be run by cron every minute.
There is a unique index for the column combination `username`, `time`, `prefix`, `charge` meaning there may be multiple entries for same prefix and hour if the price has changed.
Number of failed messages can be calculated from `msgcount` – `msg_count_ok` – `msg_count_relayed`.
Column | Description |
---|---|
id | Auto-generated unique id (primary key) |
username | emguser.username (account) |
time | Datetime (hour resolution), “2016-01-12 09” |
prefix | Prefix (as given by matching price entry) |
charge | Charge (as given by matching price entry) |
charge_cost | Charge cost (as given by matching price entry) |
charge_price_id | emgp_price.id for matching “charge” entry |
charge_cost_price_id | emgp_price.id for matching “charge_cost” entry |
msg_count | Total message count |
msg_count_ok | Number of messages with status “ok” |
msg_count_relayed | Number of messages with status “relayed” |
Table emgp_job
Send jobs created via EMG Portal “send” page.
Column | Description |
---|---|
id | Auto-generated unique id (primary key) |
user_id | User that created job. Reference to user.id |
send_at | Date and time when job should be sent. Send immediately = null. |
created | Timestamp when record created |
updated | Timestamp when record last updated |
messagebody | Message body |
started_at | Timestamp when sending of job started |
finished_at | Timestamp when sending of job finished |
Table emgp_jobrecipient
Send job recipients.
Column | Description |
---|---|
Column | Description |
id | Auto-generated unique id (primary key) |
status | Job recipient status |
senderror | EMG status |
msgid | Reference to routelog.msgid |
created | Timestamp when record created |
updated | Timestamp when record last updated |
company | Recipient company |
name | Recipient name |
destaddr | Recipient number (destination address) |
job_id | Reference to emgp_job.id |
var1 | Variable data field 1 |
var2 | Variable data field 2 |
var3 | Variable data field 3 |
var4 | Variable data field 4 |
var5 | Variable data field 5 |
Table emgp_pb
Phone books.
Table emgp_pbentry
Phone book entries.
Table emgp_price
Price entries.
Table emgp_route
Route entries.
Table emgp_settings
Settings.
Table emgp_user
Web users.