<?php

namespace AppBundle\Entity\Product;

use AppBundle\Annotation\ExportSplitFields;
use AppBundle\Entity\AccessAndFunction\Access;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Dunglas\ApiBundle\Annotation\Iri;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use AppBundle\Entity\Traits\TimestampableEntity;
use AppBundle\Entity\Traits\CreatorUpdaterEntity;
use AppBundle\Entity\Person\Person;
use AppBundle\Entity\Place\Room;
use AppBundle\Entity\Place\Place;

/**
 * Equipement, matériel
 *
 * @Iri("http://schema.org/Equipment")
 */
#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Product\Repository\EquipmentRepository')]
class Equipment extends AbstractProduct
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var Access
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'equipments', cascade: ['persist'])]
    #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'accessequipment_grid', 'equipmentmediatheque_list'])]
    private $access;
    /**
     * @var string The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.
     *
     * @Iri("https://schema.org/brand")
     */
    #[ORM\Column(type: 'string', length: 40, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['equipment', 'equipment_reference', 'equipment_list', 'equipment_list_equipmentcomposition', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentcostume_list', 'place_list_equipmentuseds', 'accessequipment_grid_equipments', 'access_details_equipments', 'equipment_details', 'equipment_details_equipmentcomposition', 'own_access_equipments', 'own_student_access_equipments', 'event_details_equipments', 'course_details_equipments', 'examen_details_equipments', 'educationalproject_details_equipments', 'equipment_availability_form_equipment'])]
    private $brand;
    /**
     * @var string An associated image.
     *
     * @Iri("https://schema.org/image")
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['equipment', 'equipment_details'])]
    private $image;
    /**
     * @var string The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties.
     *
     * @Iri("https://schema.org/model")
     */
    #[ORM\Column(type: 'string', length: 40, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['equipment', 'equipment_reference', 'equipment_list', 'equipment_list_equipmentcomposition', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentcostume_list', 'place_list_equipmentuseds', 'accessequipment_grid_equipments', 'access_details_equipments', 'equipment_details', 'equipment_details_equipmentcomposition', 'own_access_equipments', 'own_student_access_equipments', 'event_details_equipments', 'course_details_equipments', 'examen_details_equipments', 'educationalproject_details_equipments', 'equipment_availability_form_equipment'])]
    private $model;
    /**
     * @var string The name of the item.
     *
     * @Iri("https://schema.org/name")
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['equipment', 'equipment_reference', 'equipmentloan_list_equipment', 'equipmentmediatheque_list', 'place_list_equipmentuseds', 'examenconvocation_list_equipments', 'equipment_details_equipmentcomposition', 'event_details_equipments', 'course_details_equipments', 'examen_details_equipments', 'educationalproject_details_equipments', 'equipment_details', 'equipmentrent_list_equipment', 'equipment_availability_form_equipment'])]
    private $name;
    /**
     * @var string The product identifier, such as ISBN. For example: `<meta itemprop='productID' content='isbn:123-456-789'/>`.
     *
     * @Iri("https://schema.org/productID")
     */
    #[ORM\Column(type: 'string', length: 30, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['equipment', 'equipment_reference', 'equipmentrepair_list_equipment', 'accessequipment_grid_equipments', 'equipment_details', 'equipment_list', 'equipmentcostume_list', 'own_access_equipments', 'own_student_access_equipments', 'equipment_availability_form_equipment'])]
    private $productID;
    /**
     * @var string The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.
     *
     * @Iri("https://schema.org/sku")
     */
    #[ORM\Column(type: 'string', length: 35, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['equipment', 'equipment_list', 'equipment_reference', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentcostume_list', 'equipment_details', 'equipmentmediatheque_list', 'equipment_availability_form_equipment'])]
    private $sku;
    /**
     * @var \DateTime The date the item e.g. vehicle was purchased by the current owner.
     *
     * @Iri("https://schema.org/purchaseDate")
     */
    #[ORM\Column(type: 'date', nullable: true)]
    #[Assert\Date]
    #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $purchaseDate;
    /**
     * @var Place
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Place\Place', inversedBy: 'equipmentStorages')]
    #[ORM\JoinColumn(name: 'place_storage_id', nullable: true, onDelete: 'SET NULL')]
    #[Groups(['equipment', 'equipment_list', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $placeStorage;
    /**
     * @var Room
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Place\Room', inversedBy: 'equipmentStorages')]
    #[ORM\JoinColumn(name: 'room_storage_id', nullable: true, onDelete: 'SET NULL')]
    #[Groups(['equipment', 'equipment_list', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $roomStorage;
    /**
     * @var Place
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Place\Place', inversedBy: 'equipmentUseds')]
    #[ORM\JoinColumn(name: 'place_used_id', nullable: true, onDelete: 'SET NULL')]
    #[Groups(['equipment', 'equipment_list', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details', 'equipment_reference'])]
    private $placeWhereIsUsed;
    /**
     * @var Room
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Place\Room', inversedBy: 'equipmentUseds')]
    #[ORM\JoinColumn(name: 'room_used_id', nullable: true, onDelete: 'SET NULL')]
    #[Groups(['equipment', 'equipment_list', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $roomWhereIsUsed;
    /**
     * @var string
     */
    #[ORM\Column(type: 'boolean', options: ['default' => true])]
    #[Assert\Type(type: 'boolean')]
    #[Assert\NotNull]
    #[Groups(['equipment', 'equipment_details'])]
    private $isSamePlaceToStockAndUsed = true;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 100, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['equipment', 'equipment_list', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $additionalStoragePlace;
    /**
     * @var EquipmentList
     */
    #[ORM\ManyToOne(targetEntity: 'EquipmentList')]
    #[ORM\JoinColumn(nullable: true)]
    #[Groups(['equipment', 'equipment_reference', 'equipment_list', 'equipment_list_equipmentcomposition', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentcostume_list', 'place_list_equipmentuseds', 'accessequipment_grid_equipments', 'access_details_equipmentloans', 'access_details_equipments', 'equipment_details', 'equipment_details_equipmentcomposition', 'own_access_equipments', 'own_student_access_equipments', 'event_details_equipments', 'course_details_equipments', 'examen_details_equipments', 'educationalproject_details_equipments', 'equipment_availability_form_equipment'])]
    private $equipmentList;
    /**
     * @var ArrayCollection<EquipmentComposition>
     */
    #[ORM\OneToMany(targetEntity: 'EquipmentComposition', mappedBy: 'parent', orphanRemoval: true)]
    #[Groups(['equipment_equipmentcomposition', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
    private $equipmentComposition;
    /**
     * @var ArrayCollection<EquipmentRepair>
     */
    #[ORM\OneToMany(targetEntity: 'EquipmentRepair', mappedBy: 'equipment', orphanRemoval: true)]
    #[Groups(['equipment_equipmentrepair', 'equipment_details'])]
    private $equipmentRepair;
    /**
     * @var ArrayCollection<EquipmentControl>
     */
    #[ORM\OneToMany(targetEntity: 'EquipmentControl', mappedBy: 'equipment', orphanRemoval: true, cascade: ['persist'])]
    #[Groups(['equipment_equipmentcontrol', 'equipment_details'])]
    private $equipmentControl;
    /**
     * @var ArrayCollection<EquipmentLoan>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\EquipmentLoan', mappedBy: 'equipment', orphanRemoval: true, cascade: ['persist'])]
    #[Groups(['equipment_equipmentloan', 'equipment_details', 'equipment_list', 'equipmentmediatheque_list', 'equipmentcostume_list'])]
    private $equipmentLoan;
    /**
     * @var ArrayCollection|EquipmentLoan[]
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\EquipmentLoan', mappedBy: 'equipment', orphanRemoval: true, fetch: 'EXTRA_LAZY')]
    #[ORM\OrderBy(['id' => 'DESC'])]
    #[Groups(['equipment_details'])]
    private $equipmentLoanFiltered;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 35, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['equipment', 'equipment_list', 'equipment_reference', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_equipment', 'equipmentaccounting_list', 'equipmentcostume_list', 'equipment_details', 'equipmentmediatheque_list'])]
    private $skuComplementary;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['AppBundle\Enum\Product\EquipmentToneEnum', 'toArray'])]
    #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list'])]
    private $tone;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['AppBundle\Enum\Product\EquipmentStatusEnum', 'toArray'])]
    #[Groups(['equipment', 'equipment_list', 'equipmentrent_list_equipment', 'equipmentloan_list_equipment', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $status;
    /**
     * @var Access
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'equipmentSuppliers')]
    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
    #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $supplier;
    /**
     * @var float
     */
    #[ORM\Column(type: 'float', nullable: true)]
    #[Assert\Type(type: 'float')]
    #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $purchasePrice;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 15, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $billNumber;
    /**
     * @var float
     */
    #[ORM\Column(type: 'float', nullable: true)]
    #[Assert\Type(type: 'float')]
    #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $tva;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['AppBundle\Enum\Product\OutCauseEnum', 'toArray'])]
    #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $outCause;
    /**
     * @var string
     */
    #[ORM\Column(type: 'boolean', options: ['default' => false])]
    #[Assert\Type(type: 'boolean')]
    #[Assert\NotNull]
    #[Groups(['equipment', 'equipment_details'])]
    private $isComposition = false;
    /**
     * @var integer
     *
     *
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentcostume_list', 'equipment_details', 'equipment_reference'])]
    private $qte;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['AppBundle\Enum\Product\CheckingEnum', 'toArray'])]
    #[Groups(['equipment'])]
    private $detailedChecking;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['AppBundle\Enum\Product\CheckingEnum', 'toArray'])]
    #[Groups(['equipment'])]
    private $checking;
    /**
     * @var Access
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'equipmentControlManagers')]
    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
    #[Groups(['equipment'])]
    private $controlManager;
    /**
     * @var integer
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['equipment'])]
    private $serviceLife;
    /**
     * @var integer
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['equipment'])]
    private $maxUsedHour;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['AppBundle\Enum\Product\EquipmentInsuranceEnum', 'toArray'])]
    #[Groups(['equipment', 'equipment_list', 'equipmentaccounting_list', 'equipmentcostume_list', 'accessequipment_grid_equipments', 'own_access_equipments', 'own_student_access_equipments'])]
    private $insurance;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 100, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Length(max: 100, maxMessage: 'invalid-max-length')]
    #[Groups(['equipment', 'equipment_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $composer;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 100, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Length(max: 100, maxMessage: 'invalid-max-length')]
    #[Groups(['equipment', 'equipmentmediatheque_list'])]
    private $arranger;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 100, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Length(max: 100, maxMessage: 'invalid-max-length')]
    #[Groups(['equipment'])]
    private $referenceEditor;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['AppBundle\Enum\Product\OriginMusicScoreEnum', 'toArray'])]
    #[Groups(['equipment', 'equipment_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $origin;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', options: ['default' => false])]
    #[Assert\Type(type: 'boolean')]
    #[Assert\NotNull]
    #[Groups(['equipment', 'equipment_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $presenceDriver = false;
    /**
     * @var Access
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'equipmentEditors', cascade: ['persist'])]
    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
    #[Groups(['equipment', 'access', 'equipment_details', 'equipmentmediatheque_list'])]
    private $editor;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['AppBundle\Enum\Product\BandEnum', 'toArray'])]
    #[Groups(['equipment', 'equipment_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $band;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['equipment', 'equipmentmediatheque_list', 'equipment_details'])]
    private $style;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['equipment', 'equipmentmediatheque_list', 'equipment_details'])]
    private $duration;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['AppBundle\Enum\Product\DifficultyEnum', 'toArray'], message: 'invalid-choice')]
    #[Groups(['equipment', 'equipment_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'equipment_details'])]
    private $difficulty;
    /**
     * @var ArrayCollection<EquipmentList>
     */
    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Product\EquipmentList')]
    #[ORM\JoinTable(joinColumns: [], inverseJoinColumns: [])]
    #[ORM\JoinColumn(name: 'equipment_id', referencedColumnName: 'id')]
    #[ORM\JoinColumn(name: 'equipmentlist_id', referencedColumnName: 'id')]
    #[Groups(['equipment', 'equipment_equipmentlist', 'equipmentmediatheque_list', 'equipment_details'])]
    private $instrumentOrVoice;
    /**
     * @var integer
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
    private $breakingLoad;
    /**
     * @var integer
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
    private $mua;
    /**
     * @var integer
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
    private $cmu;
    /**
     * @var integer
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
    private $cmr;
    /**
     * @var integer
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
    private $verticalEffort;
    /**
     * @var integer
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['equipment', 'equipment_list', 'equipmentcostume_list', 'equipment_details'])]
    private $horizontalEffort;
    /**
     * @var integer
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['equipment', 'equipmentcontrol_list_equipment', 'equipment_details'])]
    private $theoreticalServiceLifeControl;
    /**
     * @var integer
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['equipment', 'equipmentcontrol_list_equipment', 'equipment_details'])]
    private $maximumDurationOfUseControl;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['AppBundle\Enum\Product\PeriodicityControlEnum', 'toArray'])]
    #[Groups(['equipment', 'equipmentcontrol_list_equipment', 'equipment_details'])]
    private $periodicityControl;
    /**
     * @var Access
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access')]
    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
    #[Groups(['equipment', 'equipmentcontrol_list_equipment', 'equipment_details'])]
    private $managerControl;
    /**
     * @var \DateTime
     */
    #[ORM\Column(type: 'time', nullable: true)]
    #[Assert\Time]
    #[Groups(['equipment', 'equipmentmediatheque_list', 'equipment_details'])]
    private $durationTime;
    /**
     * @var string
     *
     *
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['equipment', 'equipment_details'])]
    private $isbn;
    /**
     * @var string
     * @ExportSplitFields({"equipmentList.familly","equipmentList.category","name","brand","model"})
     *
     */
    #[Groups(['template', 'place_list_equipmentuseds'])]
    private $fullLabelTemplate;
    public function __construct()
    {
        parent::__construct();
        $this->instrumentOrVoice = new ArrayCollection();
        $this->equipmentComposition = new ArrayCollection();
        $this->equipmentRepair = new ArrayCollection();
        $this->equipmentControl = new ArrayCollection();
        $this->equipmentLoan = new ArrayCollection();
        $this->equipmentLoanFiltered = new ArrayCollection();
    }
    /**
     * Sets access.
     *
     * @param Access $access
     *
     * @return $this
     */
    public function setAccess(Access $access = null)
    {
        $this->access = $access;

        return $this;
    }
    /**
     * Gets access.
     *
     * @return Access
     */
    public function getAccess()
    {
        return $this->access;
    }
    /**
     * Sets brand.
     *
     * @param string $brand
     *
     * @return $this
     */
    public function setBrand($brand)
    {
        $this->brand = $brand;

        return $this;
    }
    /**
     * Gets brand.
     *
     * @return string
     */
    public function getBrand()
    {
        return $this->brand;
    }
    /**
     * Sets image.
     *
     * @param string $image
     *
     * @return $this
     */
    public function setImage($image)
    {
        $this->image = $image;

        return $this;
    }
    /**
     * Gets image.
     *
     * @return string
     */
    public function getImage()
    {
        return $this->image;
    }
    /**
     * Sets model.
     *
     * @param string $model
     *
     * @return $this
     */
    public function setModel($model)
    {
        $this->model = $model;

        return $this;
    }
    /**
     * Gets model.
     *
     * @return string
     */
    public function getModel()
    {
        return $this->model;
    }
    /**
     * Sets name.
     *
     * @param string $name
     *
     * @return $this
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }
    /**
     * Gets name.
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Sets productID.
     *
     * @param string $productID
     *
     * @return $this
     */
    public function setProductID($productID)
    {
        $this->productID = $productID;

        return $this;
    }
    /**
     * Gets productID.
     *
     * @return string
     */
    public function getProductID()
    {
        return $this->productID;
    }
    /**
     * Sets sku.
     *
     * @param string $sku
     *
     * @return $this
     */
    public function setSku($sku)
    {
        $this->sku = $sku;

        return $this;
    }
    /**
     * Gets sku.
     *
     * @return string
     */
    public function getSku()
    {
        return $this->sku;
    }
    /**
     * Sets purchaseDate.
     *
     * @param \DateTime $purchaseDate
     *
     * @return $this
     */
    public function setPurchaseDate(\DateTime $purchaseDate = null)
    {
        $this->purchaseDate = $purchaseDate;

        return $this;
    }
    /**
     * Gets purchaseDate.
     *
     * @return \DateTime
     */
    public function getPurchaseDate()
    {
        return $this->purchaseDate ? $this->purchaseDate->format('Y-m-d') : $this->purchaseDate;
    }
    /**
     * Sets placeStorage.
     *
     * @param Place $placeStorage
     *
     * @return $this
     */
    public function setPlaceStorage(Place $placeStorage = null)
    {
        $this->placeStorage = $placeStorage;

        return $this;
    }
    /**
     * Gets placeStorage.
     *
     * @return Place
     */
    public function getPlaceStorage()
    {
        return $this->placeStorage;
    }
    /**
     * Sets roomStorage.
     *
     * @param Room $roomStorage
     *
     * @return $this
     */
    public function setRoomStorage(Room $roomStorage = null)
    {
        $this->roomStorage = $roomStorage;

        return $this;
    }
    /**
     * Gets roomStorage.
     *
     * @return Room
     */
    public function getRoomStorage()
    {
        return $this->roomStorage;
    }
    /**
     * Sets placeWhereIsUsed
     *
     * @param Place $placeWhereIsUsed
     *
     * @return $this
     */
    public function setPlaceWhereIsUsed(Place $placeWhereIsUsed = null)
    {
        $this->placeWhereIsUsed = $placeWhereIsUsed;

        return $this;
    }
    /**
     * Gets placeWhereIsUsed
     *
     * @return Place
     */
    public function getPlaceWhereIsUsed()
    {
        return $this->placeWhereIsUsed;
    }
    /**
     * Sets roomWhereIsUsed
     *
     * @param Room $roomWhereIsUsed
     *
     * @return $this
     */
    public function setRoomWhereIsUsed(Room $roomWhereIsUsed = null)
    {
        $this->roomWhereIsUsed = $roomWhereIsUsed;

        return $this;
    }
    /**
     * Gets roomWhereIsUsed
     *
     * @return Room
     */
    public function getRoomWhereIsUsed()
    {
        return $this->roomWhereIsUsed;
    }
    /**
     * Sets additionalStoragePlace.
     *
     * @param string $additionalStoragePlace
     *
     * @return $this
     */
    public function setAdditionalStoragePlace($additionalStoragePlace)
    {
        $this->additionalStoragePlace = $additionalStoragePlace;

        return $this;
    }
    /**
     * Gets additionalStoragePlace.
     *
     * @return string
     */
    public function getAdditionalStoragePlace()
    {
        return $this->additionalStoragePlace;
    }
    /**
     * Sets equipmentList.
     *
     * @param EquipmentList $equipmentList
     *
     * @return $this
     */
    public function setEquipmentList(EquipmentList $equipmentList = null)
    {
        $this->equipmentList = $equipmentList;

        return $this;
    }
    /**
     * Gets equipmentList.
     *
     * @return EquipmentList
     */
    public function getEquipmentList()
    {
        return $this->equipmentList;
    }
    /**
     * Sets skuComplementary.
     *
     * @param string $skuComplementary
     *
     * @return $this
     */
    public function setSkuComplementary($skuComplementary)
    {
        $this->skuComplementary = $skuComplementary;

        return $this;
    }
    /**
     * Gets skuComplementary.
     *
     * @return string
     */
    public function getSkuComplementary()
    {
        return $this->skuComplementary;
    }
    /**
     * Sets tone.
     *
     * @param string $tone
     *
     * @return $this
     */
    public function setTone($tone)
    {
        $this->tone = $tone;

        return $this;
    }
    /**
     * Gets tone.
     *
     * @return string
     */
    public function getTone()
    {
        return $this->tone;
    }
    /**
     * Sets status.
     *
     * @param string $status
     *
     * @return $this
     */
    public function setStatus($status)
    {
        $this->status = $status;

        return $this;
    }
    /**
     * Gets status.
     *
     * @return string
     */
    public function getStatus()
    {
        return $this->status;
    }
    /**
     * Sets supplier.
     *
     * @param Access $supplier
     *
     * @return $this
     */
    public function setSupplier(Access $supplier = null)
    {
        $this->supplier = $supplier;

        return $this;
    }
    /**
     * Gets supplier.
     *
     * @return Access
     */
    public function getSupplier()
    {
        return $this->supplier;
    }
    /**
     * Sets purchasePrice.
     *
     * @param float $purchasePrice
     *
     * @return $this
     */
    public function setPurchasePrice($purchasePrice)
    {
        $this->purchasePrice = floatval($purchasePrice);
        return $this;
    }
    /**
     * Gets purchasePrice.
     *
     * @return float
     */
    public function getPurchasePrice()
    {
        return $this->purchasePrice;
    }
    /**
     * Sets billNumber.
     *
     * @param string $billNumber
     *
     * @return $this
     */
    public function setBillNumber($billNumber)
    {
        $this->billNumber = $billNumber;

        return $this;
    }
    /**
     * Gets billNumber.
     *
     * @return string
     */
    public function getBillNumber()
    {
        return $this->billNumber;
    }
    /**
     * Sets tva.
     *
     * @param float $tva
     *
     * @return $this
     */
    public function setTva($tva)
    {
        $this->tva = floatval($tva);

        return $this;
    }
    /**
     * Gets tva.
     *
     * @return float
     */
    public function getTva()
    {
        return $this->tva;
    }
    /**
     * Sets outCause.
     *
     * @param string $outCause
     *
     * @return $this
     */
    public function setOutCause($outCause)
    {
        $this->outCause = $outCause;

        return $this;
    }
    /**
     * Gets outCause.
     *
     * @return string
     */
    public function getOutCause()
    {
        return $this->outCause;
    }
    /**
     * Sets owner.
     *
     * @param Person person
     *
     * @return $this
     */
    public function setPerson(Person $person = null)
    {
        $this->person = $person;

        return $this;
    }
    /**
     * Gets person.
     *
     * @return Person
     */
    public function getPerson()
    {
        return $this->person;
    }
    /**
     * Sets isComposition
     *
     * @param bool $isComposition
     *
     * @return $this
     */
    public function setIsComposition($isComposition)
    {
        $this->isComposition = $isComposition;

        return $this;
    }
    /**
     * Gets isComposition
     *
     * @return bool
     */
    public function getIsComposition()
    {
        return $this->isComposition;
    }
    /**
     * Sets amount.
     *
     * @param integer $qte
     *
     * @return $this
     */
    public function setQte($qte)
    {
        $this->qte = $qte;

        return $this;
    }
    /**
     * Gets qte.
     *
     * @return integer
     */
    public function getQte()
    {
        if(!$this->isComposition)
            return null;
        return $this->qte;
    }
    /**
     * Sets detailedChecking.
     *
     * @param string $detailedChecking
     *
     * @return $this
     */
    public function setDetailedChecking($detailedChecking)
    {
        $this->detailedChecking = $detailedChecking;

        return $this;
    }
    /**
     * Gets detailedChecking.
     *
     * @return string
     */
    public function getDetailedChecking()
    {
        return $this->detailedChecking;
    }
    /**
     * Sets checking.
     *
     * @param string $checking
     *
     * @return $this
     */
    public function setChecking($checking)
    {
        $this->checking = $checking;

        return $this;
    }
    /**
     * Gets checking.
     *
     * @return string
     */
    public function getChecking()
    {
        return $this->checking;
    }
    /**
     * Sets controlManager.
     *
     * @param Access $controlManager
     *
     * @return $this
     */
    public function setControlManager(Access $controlManager = null)
    {
        $this->controlManager = $controlManager;

        return $this;
    }
    /**
     * Gets controlManager.
     *
     * @return Access
     */
    public function getControlManager()
    {
        return $this->controlManager;
    }
    /**
     * Sets serviceLife.
     *
     * @param integer $serviceLife
     *
     * @return $this
     */
    public function setServiceLife($serviceLife)
    {
        $this->serviceLife = $serviceLife;

        return $this;
    }
    /**
     * Gets serviceLife.
     *
     * @return integer
     */
    public function getServiceLife()
    {
        return $this->serviceLife;
    }
    /**
     * Sets MaxUsedHour.
     *
     * @param integer $maxUsedHour
     *
     * @return $this
     */
    public function setMaxUsedHour($maxUsedHour)
    {
        $this->maxUsedHour = $maxUsedHour;

        return $this;
    }
    /**
     * Gets MaxUsedHour.
     *
     * @return integer
     */
    public function getMaxUsedHour()
    {
        return $this->maxUsedHour;
    }
    /**
     * Sets insurance.
     *
     * @param string $insurance
     *
     * @return $this
     */
    public function setInsurance($insurance)
    {
        $this->insurance = $insurance;

        return $this;
    }
    /**
     * Gets insurance.
     *
     * @return string
     */
    public function getInsurance()
    {
        return $this->insurance;
    }
    /**
     * Sets composer.
     *
     * @param string $composer
     *
     * @return $this
     */
    public function setComposer($composer)
    {
        $this->composer = $composer;

        return $this;
    }
    /**
     * Gets composer.
     *
     * @return string
     */
    public function getComposer()
    {
        return $this->composer;
    }
    /**
     * Sets arranger.
     *
     * @param string $arranger
     *
     * @return $this
     */
    public function setArranger($arranger)
    {
        $this->arranger = $arranger;

        return $this;
    }
    /**
     * Gets arranger.
     *
     * @return string
     */
    public function getArranger()
    {
        return $this->arranger;
    }
    /**
     * Sets referenceEditor.
     *
     * @param string $referenceEditor
     *
     * @return $this
     */
    public function setReferenceEditor($referenceEditor)
    {
        $this->referenceEditor = $referenceEditor;

        return $this;
    }
    /**
     * Gets referenceEditor.
     *
     * @return string
     */
    public function getReferenceEditor()
    {
        return $this->referenceEditor;
    }
    /**
     * Sets origin.
     *
     * @param string $origin
     *
     * @return $this
     */
    public function setOrigin($origin)
    {
        $this->origin = $origin;

        return $this;
    }
    /**
     * Gets origin.
     *
     * @return string
     */
    public function getOrigin()
    {
        return $this->origin;
    }
    /**
     * Sets presenceDriver.
     *
     * @param bool $presenceDriver
     *
     * @return $this
     */
    public function setPresenceDriver($presenceDriver)
    {
        if(!$presenceDriver) $presenceDriver = false;
        $this->presenceDriver = $presenceDriver;

        return $this;
    }
    /**
     * Gets presenceDriver.
     *
     * @return bool
     */
    public function getPresenceDriver()
    {
        return $this->presenceDriver;
    }
    /**
     * Sets editor.
     *
     * @param Access $editor
     *
     * @return $this
     */
    public function setEditor(Access $editor = null)
    {
        $this->editor = $editor;

        return $this;
    }
    /**
     * Gets editor.
     *
     * @return Access
     */
    public function getEditor()
    {
        return $this->editor;
    }
    /**
     * Sets band.
     *
     * @param string $band
     *
     * @return $this
     */
    public function setBand($band)
    {
        $this->band = $band;

        return $this;
    }
    /**
     * Gets band.
     *
     * @return string
     */
    public function getBand()
    {
        return $this->band;
    }
    /**
     * Sets style.
     *
     * @param string $style
     *
     * @return $this
     */
    public function setStyle($style)
    {
        $this->style = $style;

        return $this;
    }
    /**
     * Gets style.
     *
     * @return string
     */
    public function getStyle()
    {
        return $this->style;
    }
    /**
     * Sets duration.
     *
     * @param int $duration
     *
     * @return $this
     */
    public function setDuration($duration)
    {
        $this->duration = $duration;

        return $this;
    }
    /**
     * Gets duration.
     *
     * @return int
     */
    public function getDuration()
    {
        return $this->duration;
    }
    /**
     * Sets difficulty.
     *
     * @param string $difficulty
     *
     * @return $this
     */
    public function setDifficulty($difficulty)
    {
        $this->difficulty = $difficulty;

        return $this;
    }
    /**
     * Gets difficulty.
     *
     * @return string
     */
    public function getDifficulty()
    {
        return $this->difficulty;
    }
    /**
     * Adds instrumentOrVoice.
     *
     * @param EquipmentList $instrumentOrVoice
     *
     * @return $this
     */
    public function addInstrumentOrVoice($instrumentOrVoice)
    {

        $this->instrumentOrVoice[] = $instrumentOrVoice;

        return $this;
    }
    /**
     * Removes instrumentOrVoice.
     *
     * @param EquipmentList $instrumentOrVoice
     *
     * @return $this
     */
    public function removeInstrumentOrVoice($instrumentOrVoice)
    {
        $this->instrumentOrVoice->removeElement($instrumentOrVoice);

        return $this;
    }
    /**
     * Gets instrumentOrVoice.
     *
     * @return ArrayCollection<MaterialList>
     */
    public function getInstrumentOrVoice()
    {
        return array_values($this->instrumentOrVoice->toArray());
    }
    /**
     * Gets breakingLoad.
     *
     * @return integer
     */
    public function getBreakingLoad()
    {
        return $this->breakingLoad;
    }
    /**
     * Sets breakingLoad.
     *
     * @param integer $breakingLoad
     *
     * @return $this
     */
    public function setBreakingLoad($breakingLoad)
    {
        $this->breakingLoad = $breakingLoad;

        return $this;
    }
    /**
     * Gets mua.
     *
     * @return integer
     */
    public function getMua()
    {
        return $this->mua;
    }
    /**
     * Sets mua.
     *
     * @param integer $mua
     *
     * @return $this
     */
    public function setMua($mua)
    {
        $this->mua = $mua;

        return $this;
    }
    /**
     * Gets cmu.
     *
     * @return integer
     */
    public function getCmu()
    {
        return $this->cmu;
    }
    /**
     * Sets cmu.
     *
     * @param integer $cmu
     *
     * @return $this
     */
    public function setCmu($cmu)
    {
        $this->cmu = $cmu;

        return $this;
    }
    /**
     * Gets cmr.
     *
     * @return integer
     */
    public function getCmr()
    {
        return $this->cmr;
    }
    /**
     * Sets cmr.
     *
     * @param integer $cmr
     *
     * @return $this
     */
    public function setCmr($cmr)
    {
        $this->cmr = $cmr;

        return $this;
    }
    /**
     * Gets verticalEffort.
     *
     * @return integer
     */
    public function getVerticalEffort()
    {
        return $this->verticalEffort;
    }
    /**
     * Sets verticalEffort.
     *
     * @param integer $verticalEffort
     *
     * @return $this
     */
    public function setVerticalEffort($verticalEffort)
    {
        $this->verticalEffort = $verticalEffort;

        return $this;
    }
    /**
     * Gets horizontalEffort.
     *
     * @return integer
     */
    public function getHorizontalEffort()
    {
        return $this->horizontalEffort;
    }
    /**
     * Sets horizontalEffort.
     *
     * @param integer $horizontalEffort
     *
     * @return $this
     */
    public function setHorizontalEffort($horizontalEffort)
    {
        $this->horizontalEffort = $horizontalEffort;

        return $this;
    }
    /**
     * @param EquipmentComposition $equipmentComposition
     * @return $this
     */
    public function addEquipmentComposition(EquipmentComposition $equipmentComposition)
    {
        $equipmentComposition->setParent($this);
        $this->equipmentComposition[] = $equipmentComposition;

        return $this;
    }
    /**
     * @return ArrayCollection
     */
    public function getEquipmentComposition()
    {
        return $this->equipmentComposition;
    }
    /**
     * Remove $equipmentComposition
     *
     * @param \AppBundle\Entity\Product\EquipmentComposition $equipmentComposition
     */
    public function removeEquipmentComposition(EquipmentComposition $equipmentComposition)
    {
        $this->equipmentComposition->removeElement($equipmentComposition);
    }
    /**
     * @param EquipmentRepair $equipmentRepair
     * @return $this
     */
    public function addEquipmentRepair(EquipmentRepair $equipmentRepair)
    {
        $equipmentRepair->setEquipment($this);
        $this->equipmentRepair[] = $equipmentRepair;

        return $this;
    }
    /**
     * @return ArrayCollection
     */
    public function getEquipmentRepair()
    {
        return $this->equipmentRepair;
    }
    /**
     * Remove equipmentRepair
     *
     * @param \AppBundle\Entity\Product\EquipmentRepair $equipmentRepair
     */
    public function removeEquipmentRepair(EquipmentRepair $equipmentRepair)
    {
        $this->equipmentRepair->removeElement($equipmentRepair);
    }
    /**
     * @param EquipmentControl $equipmentControl
     * @return $this
     */
    public function addEquipmentControl(EquipmentControl $equipmentControl)
    {
        $equipmentControl->setEquipment($this);
        $this->equipmentControl[] = $equipmentControl;
        return $this;
    }
    /**
     * @return ArrayCollection
     */
    public function getEquipmentControl()
    {
        return $this->equipmentControl;
    }
    /**
     * Remove equipmentControl
     *
     * @param \AppBundle\Entity\Product\EquipmentControl $equipmentControl
     */
    public function removeEquipmentControl(\AppBundle\Entity\Product\EquipmentControl $equipmentControl)
    {
        $this->equipmentControl->removeElement($equipmentControl);
    }
    /**
     * @param EquipmentLoan $equipmentLoan
     * @return $this
     */
    public function addEquipmentLoan(EquipmentLoan $equipmentLoan)
    {
        $equipmentLoan->setEquipment($this);
        $this->equipmentLoan[] = $equipmentLoan;

        return $this;
    }
    /**
     * @return ArrayCollection
     */
    public function getEquipmentLoan()
    {
        return $this->equipmentLoan;
    }
    /**
     * Remove equipmentLoan
     *
     * @param \AppBundle\Entity\Product\EquipmentLoan $equipmentLoan
     */
    public function removeEquipmentLoan(EquipmentLoan $equipmentLoan)
    {
        $this->equipmentLoan->removeElement($equipmentLoan);
    }
    /**
     * Get equipmentLoans
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getEquipmentLoanFiltered()
    {
        $filtered = array_filter($this->equipmentLoan->toArray(), function($equipmentLoansFiltered) {
            return is_null($equipmentLoansFiltered->getEndDate());
        });
        $filteredArray = new ArrayCollection(array_values($filtered));
        return $filteredArray;
    }
    /**
     * Set theoreticalServiceLifeControl
     *
     * @param integer $theoreticalServiceLifeControl
     *
     * @return Equipment
     */
    public function setTheoreticalServiceLifeControl($theoreticalServiceLifeControl)
    {
        $this->theoreticalServiceLifeControl = $theoreticalServiceLifeControl;

        return $this;
    }
    /**
     * Get theoreticalServiceLifeControl
     *
     * @return integer
     */
    public function getTheoreticalServiceLifeControl()
    {
        return $this->theoreticalServiceLifeControl;
    }
    /**
     * Set maximumDurationOfUseControl
     *
     * @param integer $maximumDurationOfUseControl
     *
     * @return Equipment
     */
    public function setMaximumDurationOfUseControl($maximumDurationOfUseControl)
    {
        $this->maximumDurationOfUseControl = $maximumDurationOfUseControl;

        return $this;
    }
    /**
     * Get maximumDurationOfUseControl
     *
     * @return integer
     */
    public function getMaximumDurationOfUseControl()
    {
        return $this->maximumDurationOfUseControl;
    }
    /**
     * Set periodicityControl
     *
     * @param string $periodicityControl
     *
     * @return Equipment
     */
    public function setPeriodicityControl($periodicityControl)
    {
        $this->periodicityControl = $periodicityControl;

        return $this;
    }
    /**
     * Get periodicityControl
     *
     * @return string
     */
    public function getPeriodicityControl()
    {
        return $this->periodicityControl;
    }
    /**
     * Set managerControl
     *
     * @param \AppBundle\Entity\AccessAndFunction\Access $managerControl
     *
     * @return Equipment
     */
    public function setManagerControl(\AppBundle\Entity\AccessAndFunction\Access $managerControl = null)
    {
        $this->managerControl = $managerControl;

        return $this;
    }
    /**
     * Get managerControl
     *
     * @return \AppBundle\Entity\AccessAndFunction\Access
     */
    public function getManagerControl()
    {
        return $this->managerControl;
    }
    /**
     * Gets full label.
     *
     * @return array
     */
    public function getFullLabelTemplate()
    {
        $fullLabel = [];
        if(!empty($this->getEquipmentList())){
            $fullLabel[] = ['value' => $this->getEquipmentList()->getFamilly(), 'translate' => true];
            $fullLabel[] = ['value' => $this->getEquipmentList()->getCategory(), 'translate' => true];
        }

        $fullLabel[] = $this->getName();
        $fullLabel[] = $this->getBrand();
        $fullLabel[] = $this->getModel();

        return $fullLabel;
    }
    /**
     * Set isSamePlaceToStockAndUsed
     *
     * @param boolean $isSamePlaceToStockAndUsed
     *
     * @return Equipment
     */
    public function setIsSamePlaceToStockAndUsed($isSamePlaceToStockAndUsed)
    {
        $this->isSamePlaceToStockAndUsed = $isSamePlaceToStockAndUsed;

        return $this;
    }
    /**
     * Get isSamePlaceToStockAndUsed
     *
     * @return boolean
     */
    public function getIsSamePlaceToStockAndUsed()
    {
        return $this->isSamePlaceToStockAndUsed;
    }
    /**
     * Set isbn
     *
     * @param string $isbn
     *
     * @return Equipment
     */
    public function setIsbn($isbn)
    {
        $this->isbn = $isbn;

        return $this;
    }
    /**
     * Get isbn
     *
     * @return string
     */
    public function getIsbn()
    {
        return $this->isbn;
    }
    /**
     * Sets duration.
     *
     * @param \DateTime $durationTime
     *
     * @return $this
     */
    public function setDurationTime($durationTime)
    {
        $this->durationTime = $durationTime;

        return $this;
    }
    /**
     * Gets duration.
     *
     * @return \DateTime
     */
    public function getDurationTime()
    {
        return $this->durationTime ? $this->durationTime->format('H:i:s') : $this->durationTime;
    }
}
