@@ -35,10 +35,12 @@ final class SoftDeleteable implements GedmoAnnotation
35
35
36
36
public bool $ hardDelete = true ;
37
37
38
+ public $ deletedValue = null ;
39
+
38
40
/**
39
41
* @param array<string, mixed> $data
40
42
*/
41
- public function __construct (array $ data = [], string $ fieldName = 'deletedAt ' , bool $ timeAware = false , bool $ hardDelete = true )
43
+ public function __construct (array $ data = [], string $ fieldName = 'deletedAt ' , bool $ timeAware = false , bool $ hardDelete = true , $ deletedValue = null )
42
44
{
43
45
if ([] !== $ data ) {
44
46
Deprecation::trigger (
@@ -53,12 +55,14 @@ public function __construct(array $data = [], string $fieldName = 'deletedAt', b
53
55
$ this ->fieldName = $ this ->getAttributeValue ($ data , 'fieldName ' , $ args , 1 , $ fieldName );
54
56
$ this ->timeAware = $ this ->getAttributeValue ($ data , 'timeAware ' , $ args , 2 , $ timeAware );
55
57
$ this ->hardDelete = $ this ->getAttributeValue ($ data , 'hardDelete ' , $ args , 3 , $ hardDelete );
58
+ $ this ->deletedValue = $ this ->getAttributeValue ($ data , 'deletedValue ' , $ args , 4 , $ deletedValue );
56
59
57
60
return ;
58
61
}
59
62
60
63
$ this ->fieldName = $ fieldName ;
61
64
$ this ->timeAware = $ timeAware ;
62
65
$ this ->hardDelete = $ hardDelete ;
66
+ $ this ->deletedValue = $ deletedValue ;
63
67
}
64
68
}
0 commit comments