Allow to import attachments and parameters via entity import

This fixes issue #363
This commit is contained in:
Jan Böhmer 2024-06-23 00:41:25 +02:00
parent bbf7222a6a
commit 06c8e584a4
19 changed files with 73 additions and 58 deletions

View file

@ -105,7 +105,7 @@ class Project extends AbstractStructuralDBElement
* @var Collection<int, ProjectBOMEntry>
*/
#[Assert\Valid]
#[Groups(['extended', 'full'])]
#[Groups(['extended', 'full', 'import'])]
#[ORM\OneToMany(mappedBy: 'project', targetEntity: ProjectBOMEntry::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
#[UniqueObjectCollection(message: 'project.bom_entry.part_already_in_bom', fields: ['part'])]
#[UniqueObjectCollection(message: 'project.bom_entry.name_already_in_bom', fields: ['name'])]
@ -118,7 +118,7 @@ class Project extends AbstractStructuralDBElement
* @var string|null The current status of the project
*/
#[Assert\Choice(['draft', 'planning', 'in_production', 'finished', 'archived'])]
#[Groups(['extended', 'full', 'project:read', 'project:write'])]
#[Groups(['extended', 'full', 'project:read', 'project:write', 'import'])]
#[ORM\Column(type: Types::STRING, length: 64, nullable: true)]
protected ?string $status = null;