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