File tree 3 files changed +67
-0
lines changed
tests/Documents/Encrypted 3 files changed +67
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Documents \Encrypted ;
6
+
7
+ use Doctrine \ODM \MongoDB \Mapping \Annotations as ODM ;
8
+
9
+ #[ODM \Document(collection: 'patients ' )]
10
+ class Patient
11
+ {
12
+ #[ODM \Id]
13
+ public ?string $ id ;
14
+
15
+ #[ODM \Field]
16
+ public string $ patientName ;
17
+
18
+ #[ODM \Field]
19
+ public int $ patientId ;
20
+
21
+ #[ODM \EmbedOne(targetDocument: PatientRecord::class)]
22
+ public PatientRecord $ patientRecord ;
23
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Documents \Encrypted ;
6
+
7
+ use Doctrine \ODM \MongoDB \Mapping \Annotations as ODM ;
8
+ use Doctrine \ODM \MongoDB \Mapping \Annotations \EmbeddedDocument ;
9
+
10
+ #[EmbeddedDocument]
11
+ class PatientBilling
12
+ {
13
+ #[ODM \Field]
14
+ public string $ type ;
15
+
16
+ #[ODM \Field]
17
+ public string $ number ;
18
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Documents \Encrypted ;
6
+
7
+ use Doctrine \ODM \MongoDB \Mapping \Annotations as ODM ;
8
+ use Doctrine \ODM \MongoDB \Mapping \Annotations \EmbeddedDocument ;
9
+
10
+ #[EmbeddedDocument]
11
+ class PatientRecord
12
+ {
13
+ #[ODM \Id]
14
+ public ?string $ id ;
15
+
16
+ #[ODM \Field]
17
+ #[ODM \Encrypt]
18
+ public string $ ssn ;
19
+
20
+ #[ODM \EmbedOne(targetDocument: PatientBilling::class)]
21
+ #[ODM \Encrypt]
22
+ public PatientBilling $ billing ;
23
+
24
+ #[ODM \Field]
25
+ public int $ billingAmount ;
26
+ }
You can’t perform that action at this time.
0 commit comments