@@ -62,47 +62,39 @@ class Invitation {
6262 'swagger_definition_name ' => 'read ' ,
6363 ];
6464
65- #[ApiProperty(readable: false , writable: false , identifier: true , example: 'myInviteKey ' )]
66- public string $ inviteKey ;
67-
68- /**
69- * The id of the camp for which this invitation is valid. This is useful for
70- * redirecting the user to the correct place after they accept.
71- */
72- #[ApiProperty(writable: false , example: '1a2b3c4d ' )]
73- #[Groups('read ' )]
74- public string $ campId ;
75-
76- /**
77- * The full title of the camp for which this invitation is valid. This should help
78- * the user to decide whether to accept or reject the invitation.
79- */
80- #[ApiProperty(writable: false , example: 'Abteilungs-Sommerlager 2022 ' )]
81- #[Groups('read ' )]
82- public string $ campTitle ;
83-
84- /**
85- * The display name of the user that is invited. May be null in case the user does
86- * not already have an account.
87- */
88- #[ApiProperty(writable: false , example: 'Robert Baden-Powell ' )]
89- #[Groups('read ' )]
90- public ?string $ userDisplayName ;
91-
92- /**
93- * Indicates whether the logged in user is already collaborating in the camp, and
94- * can therefore not accept the invitation.
95- */
96- #[ApiProperty(writable: false , example: false )]
97- #[Groups('read ' )]
98- #[Assert \IsFalse(message: 'This user is already associated with the camp. ' , groups: ['accept ' ])]
99- public ?bool $ userAlreadyInCamp ;
100-
101- public function __construct (string $ inviteKey , string $ campId , string $ campTitle , ?string $ userDisplayName , ?bool $ userAlreadyInCamp ) {
102- $ this ->inviteKey = $ inviteKey ;
103- $ this ->campId = $ campId ;
104- $ this ->campTitle = $ campTitle ;
105- $ this ->userDisplayName = $ userDisplayName ;
106- $ this ->userAlreadyInCamp = $ userAlreadyInCamp ;
65+ public function __construct (
66+ #[ApiProperty(readable: false , writable: false , identifier: true , example: 'myInviteKey ' )]
67+ public string $ inviteKey ,
68+ /**
69+ * The id of the camp for which this invitation is valid. This is useful for
70+ * redirecting the user to the correct place after they accept.
71+ */
72+ #[ApiProperty(writable: false , example: '1a2b3c4d ' )]
73+ #[Groups('read ' )]
74+ public string $ campId ,
75+ /**
76+ * The full title of the camp for which this invitation is valid. This should help
77+ * the user to decide whether to accept or reject the invitation.
78+ */
79+ #[ApiProperty(writable: false , example: 'Abteilungs-Sommerlager 2022 ' )]
80+ #[Groups('read ' )]
81+ public string $ campTitle ,
82+ /**
83+ * The display name of the user that is invited. May be null in case the user does
84+ * not already have an account.
85+ */
86+ #[ApiProperty(writable: false , example: 'Robert Baden-Powell ' )]
87+ #[Groups('read ' )]
88+ public ?string $ userDisplayName ,
89+ /**
90+ * Indicates whether the logged in user is already collaborating in the camp, and
91+ * can therefore not accept the invitation.
92+ */
93+ #[ApiProperty(writable: false , example: false )]
94+ #[Groups('read ' )]
95+ #[Assert \IsFalse(message: 'This user is already associated with the camp. ' , groups: ['accept ' ])]
96+ public ?bool $ userAlreadyInCamp
97+ )
98+ {
10799 }
108100}
0 commit comments