mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-09 18:04:33 +02:00
Moved custom validators from annotations to attributes
This commit is contained in:
parent
e5a14557a2
commit
930adaf439
27 changed files with 50 additions and 148 deletions
|
@ -104,19 +104,13 @@ abstract class Attachment extends AbstractNamedDBElement
|
|||
*/
|
||||
protected ?AttachmentContainingDBElement $element = null;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
#[ORM\Column(type: Types::BOOLEAN)]
|
||||
protected bool $show_in_table = false;
|
||||
|
||||
/**
|
||||
* @var AttachmentType|null
|
||||
* @Selectable()
|
||||
*/
|
||||
#[Assert\NotNull(message: 'validator.attachment.must_not_be_null')]
|
||||
#[ORM\ManyToOne(targetEntity: 'AttachmentType', inversedBy: 'attachments_with_type')]
|
||||
#[ORM\JoinColumn(name: 'type_id', nullable: false)]
|
||||
#[Selectable()]
|
||||
protected ?AttachmentType $attachment_type = null;
|
||||
|
||||
public function __construct()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue