start adding call support

This commit is contained in:
osaajani 2021-03-23 04:31:13 +01:00
parent e339dc4758
commit 52a0302dc2
12 changed files with 298 additions and 18 deletions

29
models/Call.php Normal file
View file

@ -0,0 +1,29 @@
<?php
/*
* This file is part of RaspiSMS.
*
* (c) Pierre-Lin Bonnemaison <plebwebsas@gmail.com>
*
* This source file is subject to the GPL-3.0 license that is bundled
* with this source code in the file LICENSE.
*/
namespace models;
/**
* Manage bdd operations for calls
*/
class Call extends StandardModel
{
const DIRECTION_INBOUND = 'inbound';
const DIRECTION_OUTBOUND = 'outbound';
/**
* Return table name.
*/
protected function get_table_name(): string
{
return 'call';
}
}

View file

@ -13,8 +13,9 @@ namespace models;
class Webhook extends StandardModel
{
const TYPE_SEND = 'send_sms';
const TYPE_RECEIVE = 'receive_sms';
const TYPE_SEND_SMS = 'send_sms';
const TYPE_RECEIVE_SMS = 'receive_sms';
const TYPE_INBOUND_CALL = 'inbound_call';
/**
* Find all webhooks for a user and for a type of webhook.