@@ -52,6 +52,7 @@ class ShareWrapper extends ManagedModel implements IDeserializable, IQueryRow, J
5252 private int $ status = 0 ;
5353 private string $ providerId = '' ;
5454 private DateTime $ shareTime ;
55+ private string $ note = '' ;
5556 private string $ sharedWith = '' ;
5657 private string $ sharedBy = '' ;
5758 private ?DateTime $ expirationDate = null ;
@@ -183,6 +184,16 @@ public function getShareTime(): DateTime {
183184 return $ this ->shareTime ;
184185 }
185186
187+ public function setShareNote (string $ note ): self {
188+ $ this ->note = $ note ;
189+
190+ return $ this ;
191+ }
192+
193+ public function getShareNote (): string {
194+ return $ this ->note ;
195+ }
196+
186197 public function setSharedWith (string $ sharedWith ): self {
187198 $ this ->sharedWith = $ sharedWith ;
188199
@@ -383,6 +394,7 @@ public function getShare(
383394 $ share ->setToken ($ this ->getToken ());
384395 $ share ->setHideDownload ($ this ->getHideDownload ());
385396 $ share ->setAttributes ($ this ->getAttributes ());
397+ $ share ->setNote ($ this ->getShareNote ());
386398 if ($ this ->hasShareToken ()) {
387399 $ password = $ this ->getShareToken ()->getPassword ();
388400 if ($ password !== '' ) {
@@ -477,7 +489,8 @@ public function import(array $data): IDeserializable {
477489 ->setSharedBy ($ this ->get ('sharedBy ' , $ data ))
478490 ->setShareOwner ($ this ->get ('shareOwner ' , $ data ))
479491 ->setToken ($ this ->get ('token ' , $ data ))
480- ->setShareTime ($ shareTime );
492+ ->setShareTime ($ shareTime )
493+ ->setShareNote ($ this ->get ('note ' , $ data ));
481494
482495 $ this ->importAttributesFromDatabase ($ this ->get ('attributes ' , $ data ));
483496
@@ -541,7 +554,8 @@ public function importFromDatabase(array $data, string $prefix = ''): IQueryRow
541554 ->setSharedBy ($ this ->get ($ prefix . 'uid_initiator ' , $ data ))
542555 ->setShareOwner ($ this ->get ($ prefix . 'uid_owner ' , $ data ))
543556 ->setToken ($ this ->get ($ prefix . 'token ' , $ data ))
544- ->setShareTime ($ shareTime );
557+ ->setShareTime ($ shareTime )
558+ ->setShareNote ($ this ->get ($ prefix . 'note ' , $ data ));
545559
546560 $ this ->importAttributesFromDatabase ($ this ->get ('attributes ' , $ data ));
547561
@@ -602,6 +616,7 @@ public function jsonSerialize(): array {
602616 'fileTarget ' => $ this ->getFileTarget (),
603617 'status ' => $ this ->getStatus (),
604618 'shareTime ' => $ this ->getShareTime ()->getTimestamp (),
619+ 'note ' => $ this ->getShareNote (),
605620 'sharedWith ' => $ this ->getSharedWith (),
606621 'sharedBy ' => $ this ->getSharedBy (),
607622 'shareOwner ' => $ this ->getShareOwner (),
0 commit comments