Skip to content

Commit

Permalink
fix: Entity parameter types
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
  • Loading branch information
SebastianKrupinski committed Oct 19, 2024
1 parent f3d117c commit c413f8d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
21 changes: 11 additions & 10 deletions lib/Db/AppointmentConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use JsonSerializable;
use OCP\AppFramework\Db\Entity;
use OCP\DB\Types;
use ReturnTypeWillChange;
use function json_decode;
use function json_encode;
Expand Down Expand Up @@ -122,16 +123,16 @@ class AppointmentConfig extends Entity implements JsonSerializable {
public const VISIBILITY_PRIVATE = 'PRIVATE';

public function __construct() {
$this->addType('start', 'int');
$this->addType('end', 'int');
$this->addType('length', 'int');
$this->addType('increment', 'int');
$this->addType('preparationDuration', 'int');
$this->addType('followupDuration', 'int');
$this->addType('timeBeforeNextSlot', 'int');
$this->addType('dailyMax', 'int');
$this->addType('futureLimit', 'int');
$this->addType('createTalkRoom', 'boolean');
$this->addType('start', Types::INTEGER);
$this->addType('end', Types::INTEGER);
$this->addType('length', Types::INTEGER);
$this->addType('increment', Types::INTEGER);
$this->addType('preparationDuration', Types::INTEGER);
$this->addType('followupDuration', Types::INTEGER);
$this->addType('timeBeforeNextSlot', Types::INTEGER);
$this->addType('dailyMax', Types::INTEGER);
$this->addType('futureLimit', Types::INTEGER);
$this->addType('createTalkRoom', Types::BOOLEAN);
}

/**
Expand Down
13 changes: 7 additions & 6 deletions lib/Db/Booking.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use JsonSerializable;
use OCP\AppFramework\Db\Entity;
use OCP\DB\Types;
use ReturnTypeWillChange;

/**
Expand Down Expand Up @@ -74,12 +75,12 @@ class Booking extends Entity implements JsonSerializable {
private $talkUrl;

public function __construct() {
$this->addType('id', 'integer');
$this->addType('apptConfigId', 'integer');
$this->addType('createdAt', 'integer');
$this->addType('start', 'integer');
$this->addType('end', 'integer');
$this->addType('confirmed', 'boolean');
$this->addType('id', Types::INTEGER);
$this->addType('apptConfigId', Types::INTEGER);
$this->addType('createdAt', Types::INTEGER);
$this->addType('start', Types::INTEGER);
$this->addType('end', Types::INTEGER);
$this->addType('confirmed', Types::BOOLEAN);
}

#[ReturnTypeWillChange]
Expand Down

0 comments on commit c413f8d

Please sign in to comment.