mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-07 07:56:23 +00:00
Added more tests and link some files. Update DB Scheme
This commit is contained in:
parent
29dc4dcf46
commit
0a16d05c0d
@ -51,11 +51,21 @@
|
||||
<type>boolean</type>
|
||||
<notnull>true</notnull>
|
||||
</field>
|
||||
<field>
|
||||
<name>sms_seen</name>
|
||||
<type>boolean</type>
|
||||
<notnull>true</notnull>
|
||||
</field>
|
||||
<field>
|
||||
<name>sms_date</name>
|
||||
<type>integer</type>
|
||||
<notnull>true</notnull>
|
||||
<length>10</length>
|
||||
<length>10</length>
|
||||
</field>
|
||||
<field>
|
||||
<name>sms_draft</name>
|
||||
<type>boolean</type>
|
||||
<notnull>true</notnull>
|
||||
</field>
|
||||
<field>
|
||||
<name>lastmodified</name>
|
||||
|
@ -5,6 +5,6 @@
|
||||
<description>Owncloud SMS app</description>
|
||||
<licence>AGPL</licence>
|
||||
<author>Loic Blot</author>
|
||||
<version>0.0.7</version>
|
||||
<version>0.0.9</version>
|
||||
<requiremin>7</requiremin>
|
||||
</info>
|
||||
|
@ -15,6 +15,7 @@ namespace OCA\OcSms\Controller;
|
||||
use \OCP\IRequest;
|
||||
use \OCP\AppFramework\Http\TemplateResponse;
|
||||
use \OCP\AppFramework\Controller;
|
||||
use OCA\OcSms\Db\SmsMgr;
|
||||
|
||||
class SmsController extends Controller {
|
||||
|
||||
@ -70,6 +71,7 @@ class SmsController extends Controller {
|
||||
return "Error: Invalid SMS date";
|
||||
}
|
||||
|
||||
$smsMgr = new SmsMgr();
|
||||
// @ TODO: test address and body ?
|
||||
}
|
||||
return "OK";
|
||||
|
29
db/sms.php
Normal file
29
db/sms.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
// db/author.php
|
||||
namespace OCA\OcSms\Db;
|
||||
|
||||
use \OCP\AppFramework\Db\Entity;
|
||||
|
||||
class Sms extends Entity {
|
||||
|
||||
protected $userId;
|
||||
protected $added;
|
||||
protected $lastmodified;
|
||||
protected $smsRead;
|
||||
protected $smsSeen;
|
||||
protected $smsDate;
|
||||
protected $smsDraft;
|
||||
protected $smsId;
|
||||
protected $smsAddress;
|
||||
protected $smsMsg;
|
||||
|
||||
public function __construct() {
|
||||
$this->addType('smsId', 'integer');
|
||||
$this->addType('smsDraft', 'boolean');
|
||||
$this->addType('smsRead', 'boolean');
|
||||
$this->addType('smsSeen', 'boolean');
|
||||
}
|
||||
|
||||
id | user_id | added | lastmodified | sms_read | sms_date | sms_id | sms_address | sms_msg
|
||||
}
|
||||
?>
|
@ -13,7 +13,7 @@ namespace OCA\OcSms\Db;
|
||||
|
||||
use \OCP\IDb;
|
||||
|
||||
class Sms {
|
||||
class SmsMgr {
|
||||
private $db;
|
||||
|
||||
public function __construct(IDb $db) {
|
||||
@ -21,7 +21,8 @@ class Sms {
|
||||
}
|
||||
|
||||
// @TODO
|
||||
public function saveAll() {
|
||||
public function saveAll($smsList) {
|
||||
|
||||
}
|
||||
|
||||
public function find($id) {
|
Loading…
x
Reference in New Issue
Block a user