mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-08 03:59:30 +00:00
Allow to import attachments and parameters via entity import
This fixes issue #363
This commit is contained in:
parent
bbf7222a6a
commit
06c8e584a4
19 changed files with 73 additions and 58 deletions
|
|
@ -48,7 +48,7 @@ abstract class AbstractCompany extends AbstractPartsContainingDBElement
|
|||
/**
|
||||
* @var string The address of the company
|
||||
*/
|
||||
#[Groups(['full', 'company:read', 'company:write'])]
|
||||
#[Groups(['full', 'company:read', 'company:write', 'import', 'extended'])]
|
||||
#[ORM\Column(type: Types::STRING)]
|
||||
#[Assert\Length(max: 255)]
|
||||
protected string $address = '';
|
||||
|
|
@ -56,7 +56,7 @@ abstract class AbstractCompany extends AbstractPartsContainingDBElement
|
|||
/**
|
||||
* @var string The phone number of the company
|
||||
*/
|
||||
#[Groups(['full', 'company:read', 'company:write'])]
|
||||
#[Groups(['full', 'company:read', 'company:write', 'import', 'extended'])]
|
||||
#[ORM\Column(type: Types::STRING)]
|
||||
#[Assert\Length(max: 255)]
|
||||
protected string $phone_number = '';
|
||||
|
|
@ -64,7 +64,7 @@ abstract class AbstractCompany extends AbstractPartsContainingDBElement
|
|||
/**
|
||||
* @var string The fax number of the company
|
||||
*/
|
||||
#[Groups(['full', 'company:read', 'company:write'])]
|
||||
#[Groups(['full', 'company:read', 'company:write', 'import', 'extended'])]
|
||||
#[ORM\Column(type: Types::STRING)]
|
||||
#[Assert\Length(max: 255)]
|
||||
protected string $fax_number = '';
|
||||
|
|
@ -73,7 +73,7 @@ abstract class AbstractCompany extends AbstractPartsContainingDBElement
|
|||
* @var string The email address of the company
|
||||
*/
|
||||
#[Assert\Email]
|
||||
#[Groups(['full', 'company:read', 'company:write'])]
|
||||
#[Groups(['full', 'company:read', 'company:write', 'import', 'extended'])]
|
||||
#[ORM\Column(type: Types::STRING)]
|
||||
#[Assert\Length(max: 255)]
|
||||
protected string $email_address = '';
|
||||
|
|
@ -82,12 +82,12 @@ abstract class AbstractCompany extends AbstractPartsContainingDBElement
|
|||
* @var string The website of the company
|
||||
*/
|
||||
#[Assert\Url]
|
||||
#[Groups(['full', 'company:read', 'company:write'])]
|
||||
#[Groups(['full', 'company:read', 'company:write', 'import', 'extended'])]
|
||||
#[ORM\Column(type: Types::STRING)]
|
||||
#[Assert\Length(max: 255)]
|
||||
protected string $website = '';
|
||||
|
||||
#[Groups(['company:read', 'company:write'])]
|
||||
#[Groups(['company:read', 'company:write', 'import', 'full', 'extended'])]
|
||||
protected string $comment = '';
|
||||
|
||||
/**
|
||||
|
|
@ -95,6 +95,7 @@ abstract class AbstractCompany extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
#[ORM\Column(type: Types::STRING)]
|
||||
#[Assert\Length(max: 255)]
|
||||
#[Groups(['full', 'company:read', 'company:write', 'import', 'extended'])]
|
||||
protected string $auto_product_url = '';
|
||||
|
||||
/********************************************************************************
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
|||
#[ORM\MappedSuperclass(repositoryClass: AbstractPartsContainingRepository::class)]
|
||||
abstract class AbstractPartsContainingDBElement extends AbstractStructuralDBElement
|
||||
{
|
||||
#[Groups(['full'])]
|
||||
#[Groups(['full', 'import'])]
|
||||
protected Collection $parameters;
|
||||
|
||||
public function __construct()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue