mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-15 21:04:34 +02:00
Added constraints for selectable attribute.
This commit is contained in:
parent
408d98c6e1
commit
51be176418
12 changed files with 169 additions and 0 deletions
|
@ -66,6 +66,7 @@ use App\Entity\Attachments\AttachmentContainingDBElement;
|
|||
use App\Entity\Devices\Device;
|
||||
use App\Entity\PriceInformations\Orderdetail;
|
||||
use App\Security\Annotations\ColumnSecurity;
|
||||
use App\Validator\Constraints\Selectable;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
@ -89,6 +90,7 @@ class Part extends AttachmentContainingDBElement
|
|||
* @var Category
|
||||
* @ORM\ManyToOne(targetEntity="Category", inversedBy="parts")
|
||||
* @ORM\JoinColumn(name="id_category", referencedColumnName="id")
|
||||
* @Selectable()
|
||||
*/
|
||||
protected $category;
|
||||
|
||||
|
@ -98,6 +100,7 @@ class Part extends AttachmentContainingDBElement
|
|||
* @ORM\JoinColumn(name="id_footprint", referencedColumnName="id")
|
||||
*
|
||||
* @ColumnSecurity(prefix="footprint", type="object")
|
||||
* @Selectable()
|
||||
*/
|
||||
protected $footprint;
|
||||
|
||||
|
@ -107,6 +110,7 @@ class Part extends AttachmentContainingDBElement
|
|||
* @ORM\JoinColumn(name="id_manufacturer", referencedColumnName="id")
|
||||
*
|
||||
* @ColumnSecurity(prefix="manufacturer", type="object")
|
||||
* @Selectable()
|
||||
*/
|
||||
protected $manufacturer;
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ namespace App\Entity\Parts;
|
|||
use App\Entity\Base\DBElement;
|
||||
use App\Entity\Base\NamedDBElement;
|
||||
use App\Entity\Base\TimestampTrait;
|
||||
use App\Validator\Constraints\Selectable;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
|
@ -74,6 +75,7 @@ class PartLot extends DBElement
|
|||
* @var Storelocation The storelocation of this lot
|
||||
* @ORM\ManyToOne(targetEntity="Storelocation")
|
||||
* @ORM\JoinColumn(name="id_store_location", referencedColumnName="id")
|
||||
* @Selectable()
|
||||
*/
|
||||
protected $storage_location;
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@ namespace App\Entity\Parts;
|
|||
|
||||
use App\Entity\Base\Company;
|
||||
use App\Entity\PriceInformations\Currency;
|
||||
use App\Validator\Constraints\Selectable;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
|
@ -95,6 +96,7 @@ class Supplier extends Company
|
|||
* Set to null, to use global base currency.
|
||||
* @ORM\ManyToOne(targetEntity="App\Entity\PriceInformations\Currency")
|
||||
* @ORM\JoinColumn(name="default_currency_id", referencedColumnName="id", nullable=true)
|
||||
* @Selectable()
|
||||
*/
|
||||
protected $default_currency;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue