Start implementing board sharing

This commit is contained in:
Julius Haertl
2016-08-16 10:29:37 +02:00
parent 135d9c9cbc
commit 6a040f1470
10 changed files with 140 additions and 25 deletions

View File

@@ -13,15 +13,19 @@ class Board extends \OCA\Deck\Db\Entity implements JsonSerializable {
protected $archived;
protected $labels;
protected $acl;
protected $shared;
public function __construct() {
$this->addType('id','integer');
$this->addType('shared','integer');
$this->addRelation('labels');
$this->addRelation('acl');
$this->addRelation('shared');
$this->shared = -1;
}
public function jsonSerialize() {
return [
$result = [
'id' => $this->id,
'title' => $this->title,
'owner' => $this->owner,
@@ -29,6 +33,10 @@ class Board extends \OCA\Deck\Db\Entity implements JsonSerializable {
'labels' => $this->labels,
'acl' => $this->acl,
];
if($this->shared!==-1) {
$result['shared'] = $this->shared;
}
return $result;
}
public function setLabels($labels) {