diff --git a/lib/Db/Bill.php b/lib/Db/Bill.php index 862ee6b83..2fa9edee3 100644 --- a/lib/Db/Bill.php +++ b/lib/Db/Bill.php @@ -48,21 +48,21 @@ * @method void setDeleted(int $deleted) */ class Bill extends Entity implements \JsonSerializable { - protected string $what = '...'; - protected ?string $comment = null; - protected int $payerId = 0; - protected float $amount = -1; - protected int $timestamp = 0; - protected string $repeat = 'n'; - protected int $repeatAllActive = 0; - protected ?string $repeatUntil = null; - protected int $repeatFrequency = 1; - protected string $projectId = ''; - protected ?int $categoryId = null; - protected ?string $paymentMode = null; - protected ?int $paymentModeId = 0; - protected int $lastChanged = 0; - protected int $deleted = 0; + protected $what; + protected $comment; + protected $payerId; + protected $amount; + protected $timestamp; + protected $repeat; + protected $repeatAllActive; + protected $repeatUntil; + protected $repeatFrequency; + protected $projectId; + protected $categoryId; + protected $paymentMode; + protected $paymentModeId; + protected $lastChanged; + protected $deleted; public function __construct() { $this->addType('id', 'integer'); diff --git a/lib/Db/BillOwer.php b/lib/Db/BillOwer.php index c2ce2b64c..1cd62d55f 100644 --- a/lib/Db/BillOwer.php +++ b/lib/Db/BillOwer.php @@ -22,8 +22,8 @@ **/ class BillOwer extends Entity implements \JsonSerializable { - protected int $billId = 0; - protected int $memberId = 0; + protected $billId; + protected $memberId; public function __construct() { $this->addType('id', 'integer'); diff --git a/lib/Db/Category.php b/lib/Db/Category.php index 37f91b9aa..679321f30 100644 --- a/lib/Db/Category.php +++ b/lib/Db/Category.php @@ -23,11 +23,12 @@ * @method int getOrder() */ class Category extends Entity implements \JsonSerializable { - protected string $projectId = ''; - protected ?string $name = null; - protected ?string $color = null; - protected ?string $encodedIcon = null; - protected int $order = 0; + + protected $projectId; + protected $name; + protected $color; + protected $encodedIcon; + protected $order; public function __construct() { $this->addType('project_id', 'string'); diff --git a/lib/Db/Currency.php b/lib/Db/Currency.php index 7b65e4014..a58cb1086 100644 --- a/lib/Db/Currency.php +++ b/lib/Db/Currency.php @@ -19,9 +19,10 @@ * @method float getExchangeRate() */ class Currency extends Entity implements \JsonSerializable { - protected string $projectId = ''; - protected string $name = ''; - protected float $exchangeRate = -999; + + protected $projectId; + protected $name; + protected $exchangeRate; public function __construct() { $this->addType('project_id', 'string'); diff --git a/lib/Db/Invitation.php b/lib/Db/Invitation.php index 423160df4..8e28b7f17 100644 --- a/lib/Db/Invitation.php +++ b/lib/Db/Invitation.php @@ -29,17 +29,18 @@ * @method string getInviterDisplayName() */ class Invitation extends Entity implements \JsonSerializable { + public const STATE_PENDING = 0; public const STATE_ACCEPTED = 1; - protected string $userId = ''; - protected int $state = self::STATE_PENDING; - protected string $accessToken = ''; - protected string $remoteProjectId = ''; - protected string $remoteProjectName = '...'; - protected string $remoteServerUrl = ''; - protected string $inviterCloudId = ''; - protected string $inviterDisplayName = ''; + protected $userId; + protected $state; + protected $accessToken; + protected $remoteProjectId; + protected $remoteProjectName; + protected $remoteServerUrl; + protected $inviterCloudId; + protected $inviterDisplayName; public function __construct() { $this->addType('userId', 'string'); diff --git a/lib/Db/Member.php b/lib/Db/Member.php index 09ec0be7f..119b4e6cf 100644 --- a/lib/Db/Member.php +++ b/lib/Db/Member.php @@ -36,13 +36,13 @@ */ class Member extends Entity implements \JsonSerializable { - protected string $projectId = ''; - protected string $name = ''; - protected float $weight = -1; - protected int $activated = 1; - protected int $lastChanged = 0; - protected ?string $color = null; - protected ?string $userId = null; + protected $projectId; + protected $name; + protected $weight; + protected $activated; + protected $lastChanged; + protected $color; + protected $userId; private $avatarManager; diff --git a/lib/Db/PaymentMode.php b/lib/Db/PaymentMode.php index 778e18250..2276f1b24 100644 --- a/lib/Db/PaymentMode.php +++ b/lib/Db/PaymentMode.php @@ -25,12 +25,13 @@ * @method string|null getOldId() */ class PaymentMode extends Entity implements \JsonSerializable { - protected string $projectId = ''; - protected ?string $name = null; - protected ?string $color = null; - protected ?string $encodedIcon = null; - protected int $order = 0; - protected ?string $oldId = null; + + protected $projectId; + protected $name; + protected $color; + protected $encodedIcon; + protected $order; + protected $oldId; public function __construct() { $this->addType('project_id', 'string'); diff --git a/lib/Db/Project.php b/lib/Db/Project.php index adc0e1448..4717f6d87 100644 --- a/lib/Db/Project.php +++ b/lib/Db/Project.php @@ -38,15 +38,15 @@ */ class Project extends Entity implements \JsonSerializable { - protected string $userId = ''; - protected string $name = ''; - protected string $autoExport = 'n'; - protected int $lastChanged = 0; - protected int $deletionDisabled = 0; - protected string $categorySort = 'a'; - protected string $paymentModeSort = 'a'; - protected ?string $currencyName = null; - protected ?int $archivedTs = null; + protected $userId; + protected $name; + protected $autoExport; + protected $lastChanged; + protected $deletionDisabled; + protected $categorySort; + protected $paymentModeSort; + protected $currencyName; + protected $archivedTs; public function __construct() { $this->addType('id', 'string'); diff --git a/lib/Db/Share.php b/lib/Db/Share.php index fdd520e5a..fc2eeee9b 100644 --- a/lib/Db/Share.php +++ b/lib/Db/Share.php @@ -31,21 +31,22 @@ * @method int|null getState() */ class Share extends Entity implements \JsonSerializable { + public const TYPE_FEDERATION = 'f'; public const TYPE_PUBLIC_LINK = 'l'; public const TYPE_USER = 'u'; public const TYPE_GROUP = 'g'; public const TYPE_CIRCLE = 'c'; - protected string $projectId = ''; - protected ?string $userId = null; - protected string $type = self::TYPE_USER; - protected int $accessLevel = 2; - protected int $manuallyAdded = 1; - protected ?string $label = null; - protected ?string $password = null; - protected ?string $userCloudId = null; - protected ?int $state = null; + protected $projectId; + protected $userId; + protected $type; + protected $accessLevel; + protected $manuallyAdded; + protected $label; + protected $password; + protected $userCloudId; + protected $state; public function __construct() { $this->addType('project_id', 'string');