~cypheon/nextcloud-chores-app

ref: d19a6603c01e63c7545582e5ff313ef4aec0bf9f nextcloud-chores-app/lib/Db/Team.php -rw-r--r-- 625 bytes
d19a6603 — Johann Rudloff Make overdue sidebar badge dynamic, switch badges to `CounterBubble` component 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
namespace OCA\Chores\Db;

use JsonSerializable;

use OCP\AppFramework\Db\Entity;

class Team extends Entity implements JsonSerializable {

    protected $teamName;
    protected $ownerUserId;
    protected $content;
    protected $members;
    protected $invites;

    public function __construct() {
        $this->addType('id', 'integer');
    }

    public function jsonSerialize() {
        return [
            'id' => $this->id,
            'name' => $this->teamName,
            'owner' => $this->ownerUserId,
            'members' => $this->members,
            'invites' => $this->invites,
        ];
    }
}