1 | <?php |
||
52 | class Form implements Identifiable, Uuidentifiable, Ownable, Translatable, Localizable, Deletable, Versionable, Tenantable |
||
53 | { |
||
54 | use Behavior\Translatable\Translatable; |
||
55 | use Behavior\Timestampable\Timestampable; |
||
56 | use Behavior\SoftDeletable\SoftDeletable; |
||
57 | |||
58 | use Accessor\Id; |
||
59 | use Accessor\Uuid; |
||
60 | use Accessor\Owner; |
||
61 | use Accessor\OwnerUuid; |
||
62 | use Accessor\Type; |
||
63 | use Accessor\Config; |
||
64 | use TranslationAccessor\Title; |
||
65 | use TranslationAccessor\Description; |
||
66 | use Accessor\Data; |
||
67 | use Accessor\Deleted; |
||
68 | use Accessor\Version; |
||
69 | use TenantAccessor\Tenant; |
||
70 | |||
71 | /** |
||
72 | * @const string |
||
73 | */ |
||
74 | const TYPE_FORMIO = 'formio'; |
||
75 | |||
76 | /** |
||
77 | * @var integer |
||
78 | * @ApiProperty(identifier=false, writable=false) |
||
79 | * @Serializer\Groups({"form_output"}) |
||
80 | * @ORM\Id |
||
81 | * @ORM\GeneratedValue(strategy="AUTO") |
||
82 | * @ORM\Column(name="id", type="integer") |
||
83 | */ |
||
84 | private $id; |
||
85 | |||
86 | /** |
||
87 | * @var string |
||
88 | * @ApiProperty(identifier=true, writable=false) |
||
89 | * @Serializer\Groups({"form_output"}) |
||
90 | * @ORM\Column(name="uuid", type="guid", unique=true) |
||
91 | * @Assert\Uuid |
||
92 | */ |
||
93 | private $uuid; |
||
94 | |||
95 | /** |
||
96 | * @var \DateTime |
||
97 | * @ApiProperty(writable=false) |
||
98 | * @Serializer\Groups({"form_output"}) |
||
99 | */ |
||
100 | protected $createdAt; |
||
101 | |||
102 | /** |
||
103 | * @var \DateTime |
||
104 | * @ApiProperty(writable=false) |
||
105 | * @Serializer\Groups({"form_output"}) |
||
106 | */ |
||
107 | protected $updatedAt; |
||
108 | |||
109 | /** |
||
110 | * @var \DateTime |
||
111 | * @ApiProperty(writable=false) |
||
112 | * @Serializer\Groups({"form_output"}) |
||
113 | */ |
||
114 | protected $deletedAt; |
||
115 | |||
116 | /** |
||
117 | * @var string |
||
118 | * @ApiProperty |
||
119 | * @Serializer\Groups({"form_output", "form_input"}) |
||
120 | * @ORM\Column(name="`owner`", type="string", length=255, nullable=true) |
||
121 | * @Assert\NotBlank |
||
122 | * @Assert\Length(min=1, max=255) |
||
123 | */ |
||
124 | private $owner; |
||
125 | |||
126 | /** |
||
127 | * @var string |
||
128 | * @ApiProperty |
||
129 | * @Serializer\Groups({"form_output", "form_input"}) |
||
130 | * @ORM\Column(name="owner_uuid", type="guid", nullable=true) |
||
131 | * @Assert\NotBlank |
||
132 | * @Assert\Uuid |
||
133 | */ |
||
134 | private $ownerUuid; |
||
135 | |||
136 | /** |
||
137 | * @var string |
||
138 | * @ApiProperty |
||
139 | * @Serializer\Groups({"form_output", "form_input"}) |
||
140 | * @ORM\Column(name="type", type="string", length=255, nullable=true) |
||
141 | * @Assert\NotBlank |
||
142 | * @Assert\Length(min=1, max=255) |
||
143 | */ |
||
144 | private $type; |
||
145 | |||
146 | /** |
||
147 | * @var array |
||
148 | * @ApiProperty |
||
149 | * @Serializer\Groups({"form_output", "form_input"}) |
||
150 | * @ORM\Column(name="config", type="json_array") |
||
151 | * @Assert\Type("array") |
||
152 | */ |
||
153 | private $config; |
||
154 | |||
155 | /** |
||
156 | * @var array |
||
157 | * @ApiProperty |
||
158 | * @Serializer\Groups({"form_output", "form_input"}) |
||
159 | * @Assert\Type("array") |
||
160 | * @Assert\NotBlank |
||
161 | * @Assert\All({ |
||
162 | * @Assert\NotBlank, |
||
163 | * @Assert\Length(min=1) |
||
164 | * }) |
||
165 | * @Locale |
||
166 | * @Translate |
||
167 | */ |
||
168 | private $title; |
||
169 | |||
170 | /** |
||
171 | * @var array |
||
172 | * @ApiProperty |
||
173 | * @Serializer\Groups({"form_output", "form_input"}) |
||
174 | * @Assert\Type("array") |
||
175 | * @Assert\NotBlank |
||
176 | * @Assert\All({ |
||
177 | * @Assert\NotBlank, |
||
178 | * @Assert\Length(min=1) |
||
179 | * }) |
||
180 | * @Locale |
||
181 | * @Translate |
||
182 | */ |
||
183 | private $description; |
||
184 | |||
185 | /** |
||
186 | * @var array |
||
187 | * @ApiProperty |
||
188 | * @Serializer\Groups({"form_output", "form_input"}) |
||
189 | * @ORM\Column(name="data", type="json_array") |
||
190 | * @Assert\Type("array") |
||
191 | */ |
||
192 | private $data; |
||
193 | |||
194 | /** |
||
195 | * @var integer |
||
196 | * @ApiProperty |
||
197 | * @Serializer\Groups({"form_output", "form_input"}) |
||
198 | * @ORM\Column(name="version", type="integer") |
||
199 | * @ORM\Version |
||
200 | * @Assert\NotBlank |
||
201 | * @Assert\Type("integer") |
||
202 | */ |
||
203 | private $version; |
||
204 | |||
205 | /** |
||
206 | * @var string |
||
207 | * @ApiProperty(writable=false) |
||
208 | * @Serializer\Groups({"form_output"}) |
||
209 | * @ORM\Column(name="tenant", type="guid") |
||
210 | * @Assert\Uuid |
||
211 | */ |
||
212 | private $tenant; |
||
213 | |||
214 | /** |
||
215 | * Constructor |
||
216 | */ |
||
217 | public function __construct() |
||
224 | } |
||
225 |