mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-14 15:09:31 +00:00
parent
a3d6f77fda
commit
a5275f7be7
4 changed files with 166 additions and 9 deletions
|
|
@ -166,9 +166,10 @@ abstract class Attachment extends AbstractNamedDBElement
|
|||
* @var string|null The path to the external source if the file is stored externally or was downloaded from an
|
||||
* external source. Null if there is no external source.
|
||||
*/
|
||||
#[ORM\Column(type: Types::STRING, nullable: true)]
|
||||
#[ORM\Column(type: Types::STRING, length: 2048, nullable: true)]
|
||||
#[Groups(['attachment:read'])]
|
||||
#[ApiProperty(example: 'http://example.com/image.jpg')]
|
||||
#[Assert\Length(2048)]
|
||||
protected ?string $external_path = null;
|
||||
|
||||
/**
|
||||
|
|
@ -551,8 +552,8 @@ abstract class Attachment extends AbstractNamedDBElement
|
|||
*/
|
||||
#[Groups(['attachment:write'])]
|
||||
#[SerializedName('url')]
|
||||
#[ApiProperty(description: 'Set the path of the attachment here.
|
||||
Provide either an external URL, a path to a builtin file (like %FOOTPRINTS%/Active/ICs/IC_DFS.png) or an empty
|
||||
#[ApiProperty(description: 'Set the path of the attachment here.
|
||||
Provide either an external URL, a path to a builtin file (like %FOOTPRINTS%/Active/ICs/IC_DFS.png) or an empty
|
||||
string if the attachment has an internal file associated and you\'d like to reset the external source.
|
||||
If you set a new (nonempty) file path any associated internal file will be removed!')]
|
||||
public function setURL(?string $url): self
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ abstract class AbstractCompany extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
#[Assert\Url(requireTld: false)]
|
||||
#[Groups(['full', 'company:read', 'company:write', 'import', 'extended'])]
|
||||
#[ORM\Column(type: Types::STRING)]
|
||||
#[Assert\Length(max: 255)]
|
||||
#[ORM\Column(type: Types::STRING, length: 2048)]
|
||||
#[Assert\Length(max: 2048)]
|
||||
protected string $website = '';
|
||||
|
||||
#[Groups(['company:read', 'company:write', 'import', 'full', 'extended'])]
|
||||
|
|
@ -93,8 +93,8 @@ abstract class AbstractCompany extends AbstractPartsContainingDBElement
|
|||
/**
|
||||
* @var string The link to the website of an article. Use %PARTNUMBER% as placeholder for the part number.
|
||||
*/
|
||||
#[ORM\Column(type: Types::STRING)]
|
||||
#[Assert\Length(max: 255)]
|
||||
#[ORM\Column(type: Types::STRING, length: 2048)]
|
||||
#[Assert\Length(max: 2048)]
|
||||
#[Groups(['full', 'company:read', 'company:write', 'import', 'extended'])]
|
||||
protected string $auto_product_url = '';
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class InfoProviderReference
|
|||
/**
|
||||
* @var string|null The url of this part inside the provider system or null if this info is not existing
|
||||
*/
|
||||
#[Column(type: Types::STRING, nullable: true)]
|
||||
#[Column(type: Types::STRING, length: 2048, nullable: true)]
|
||||
#[Groups(['provider_reference:read', 'full'])]
|
||||
private ?string $provider_url = null;
|
||||
|
||||
|
|
@ -157,4 +157,4 @@ class InfoProviderReference
|
|||
$ref->last_updated = new \DateTimeImmutable();
|
||||
return $ref;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue