diff --git a/lib/Store/Local/BaseEntity.php b/lib/Store/Local/BaseEntity.php new file mode 100644 index 0000000..520c3d3 --- /dev/null +++ b/lib/Store/Local/BaseEntity.php @@ -0,0 +1,31 @@ +_Store->getQueryBuilder(); @@ -649,11 +649,11 @@ public function entityCreate(Entity $entity): Entity { /** * modify a entity entry in the data store * - * @param Entity $entity + * @param BaseEntity $entity * - * @return Entity + * @return BaseEntity */ - public function entityModify(Entity $entity): Entity { + public function entityModify(BaseEntity $entity): BaseEntity { // construct data store command $cmd = $this->_Store->getQueryBuilder(); @@ -685,11 +685,11 @@ public function entityModify(Entity $entity): Entity { /** * delete a entity from the data store * - * @param Entity $entity + * @param BaseEntity $entity * - * @return Entity + * @return BaseEntity */ - public function entityDelete(Entity $entity): Entity { + public function entityDelete(BaseEntity $entity): BaseEntity { // construct data store command $cmd = $this->_Store->getQueryBuilder(); @@ -776,10 +776,10 @@ public function entityDeleteByCollection(int $cid): mixed { * * @param string $uid user id * @param int $sid service id - * @param string $cid collection id - * @param string $eid entity id + * @param int $cid collection id + * @param int $eid entity id * @param string $euuid entity uuid - * @param string $operation operation type (1 - Created, 2 - Modified, 3 - Deleted) + * @param int $operation operation type (1 - Created, 2 - Modified, 3 - Deleted) * * @return string */ diff --git a/lib/Store/Local/ContactEntity.php b/lib/Store/Local/ContactEntity.php index 46f5261..95740b4 100644 --- a/lib/Store/Local/ContactEntity.php +++ b/lib/Store/Local/ContactEntity.php @@ -9,18 +9,7 @@ namespace OCA\DAVC\Store\Local; -use OCP\AppFramework\Db\Entity; - /** - * @method getId(): int - * @method getUid(): string - * @method setUid(string $uid): void - * @method getSid(): string - * @method setSid(int $sid): void - * @method getCid(): string - * @method setCid(int $cid): void - * @method getUuid(): string - * @method setUuid(string $uuid): void * @method getSignature(): string * @method setSignature(string $signature): void * @method getCcid(): string @@ -34,7 +23,7 @@ * @method getLabel(): string * @method setLabel(string $label): void */ -class ContactEntity extends Entity { +class ContactEntity extends BaseEntity { protected ?string $uid = null; protected ?int $sid = null; protected ?int $cid = null; diff --git a/lib/Store/Local/EventEntity.php b/lib/Store/Local/EventEntity.php index 28df5ad..7c8fd15 100644 --- a/lib/Store/Local/EventEntity.php +++ b/lib/Store/Local/EventEntity.php @@ -9,18 +9,7 @@ namespace OCA\DAVC\Store\Local; -use OCP\AppFramework\Db\Entity; - /** - * @method getId(): int - * @method getUid(): string - * @method setUid(string $uid): void - * @method getSid(): string - * @method setSid(int $sid): void - * @method getCid(): string - * @method setCid(int $cid): void - * @method getUuid(): string - * @method setUuid(string $uuid): void * @method getSignature(): string * @method setSignature(string $signature): void * @method getCcid(): string @@ -40,7 +29,7 @@ * @method getEndson(): int * @method setEndson(int $endson): void */ -class EventEntity extends Entity { +class EventEntity extends BaseEntity { protected ?string $uid = null; protected ?int $sid = null; protected ?int $cid = null;