mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-14 06:09:33 +00:00
Fixed some inspection issues
This commit is contained in:
parent
33475dca66
commit
42e604245c
85 changed files with 272 additions and 291 deletions
|
|
@ -64,7 +64,7 @@ trait BasicPropertyTrait
|
|||
* Every part must have a category.
|
||||
*/
|
||||
#[Assert\NotNull(message: 'validator.select_valid_category')]
|
||||
#[Selectable()]
|
||||
#[Selectable]
|
||||
#[Groups(['simple', 'extended', 'full', 'import', "part:read", "part:write"])]
|
||||
#[ORM\ManyToOne(targetEntity: Category::class)]
|
||||
#[ORM\JoinColumn(name: 'id_category', nullable: false)]
|
||||
|
|
@ -76,7 +76,7 @@ trait BasicPropertyTrait
|
|||
#[Groups(['simple', 'extended', 'full', 'import', 'part:read', 'part:write'])]
|
||||
#[ORM\ManyToOne(targetEntity: Footprint::class)]
|
||||
#[ORM\JoinColumn(name: 'id_footprint')]
|
||||
#[Selectable()]
|
||||
#[Selectable]
|
||||
protected ?Footprint $footprint = null;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ trait InstockTrait
|
|||
*/
|
||||
#[Assert\Valid]
|
||||
#[Groups(['extended', 'full', 'import', 'part:read', 'part:write'])]
|
||||
#[ORM\OneToMany(targetEntity: PartLot::class, mappedBy: 'part', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
#[ORM\OneToMany(mappedBy: 'part', targetEntity: PartLot::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
#[ORM\OrderBy(['amount' => 'DESC'])]
|
||||
protected Collection $partLots;
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ trait ManufacturerTrait
|
|||
#[Groups(['simple', 'extended', 'full', 'import', 'part:read', 'part:write'])]
|
||||
#[ORM\ManyToOne(targetEntity: Manufacturer::class)]
|
||||
#[ORM\JoinColumn(name: 'id_manufacturer')]
|
||||
#[Selectable()]
|
||||
#[Selectable]
|
||||
protected ?Manufacturer $manufacturer = null;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ trait OrderTrait
|
|||
*/
|
||||
#[Assert\Valid]
|
||||
#[Groups(['extended', 'full', 'import', 'part:read', 'part:write'])]
|
||||
#[ORM\OneToMany(targetEntity: Orderdetail::class, mappedBy: 'part', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
#[ORM\OneToMany(mappedBy: 'part', targetEntity: Orderdetail::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
#[ORM\OrderBy(['supplierpartnr' => 'ASC'])]
|
||||
protected Collection $orderdetails;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,13 +16,13 @@ trait ProjectTrait
|
|||
/**
|
||||
* @var Collection<ProjectBOMEntry> $project_bom_entries
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: ProjectBOMEntry::class, mappedBy: 'part', cascade: ['remove'], orphanRemoval: true)]
|
||||
#[ORM\OneToMany(mappedBy: 'part', targetEntity: ProjectBOMEntry::class, cascade: ['remove'], orphanRemoval: true)]
|
||||
protected Collection $project_bom_entries;
|
||||
|
||||
/**
|
||||
* @var Project|null If a project is set here, then this part is special and represents the builds of a project.
|
||||
*/
|
||||
#[ORM\OneToOne(targetEntity: Project::class, inversedBy: 'build_part')]
|
||||
#[ORM\OneToOne(inversedBy: 'build_part', targetEntity: Project::class)]
|
||||
#[ORM\JoinColumn]
|
||||
protected ?Project $built_project = null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue