diff --git a/src/Entity/BatteryType.php b/src/Entity/BatteryType.php index 8c864e4..2e0bd15 100644 --- a/src/Entity/BatteryType.php +++ b/src/Entity/BatteryType.php @@ -18,7 +18,6 @@ class BatteryType * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="SEQUENCE") - * @ORM\SequenceGenerator(sequenceName="camera.camera_type_id_seq", allocationSize=1, initialValue=1) */ private $id; } diff --git a/src/Entity/CameraType.php b/src/Entity/CameraType.php index c0cd280..f340287 100644 --- a/src/Entity/CameraType.php +++ b/src/Entity/CameraType.php @@ -18,7 +18,6 @@ class CameraType * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="SEQUENCE") - * @ORM\SequenceGenerator(sequenceName="camera.camera_type_id_seq", allocationSize=1, initialValue=1) */ private $id; @@ -29,13 +28,20 @@ class CameraType */ private $type; + /** + * @var string + * + * @ORM\Column(name="description", type="text", nullable=true) + */ + private $description; + /** * Value for serialization * * @return string */ - public function __toString() + public function __toString(): string { return $this->type; } @@ -46,7 +52,7 @@ class CameraType * * @return integer */ - public function getId() + public function getId(): int { return $this->id; } @@ -58,20 +64,44 @@ class CameraType * * @return CameraType */ - public function setType($type) + public function setType(string $type): self { $this->type = $type; return $this; } + /** + * Set description + * + * @param string $description + * + * @return CameraType + */ + public function setDescription(string $description): self + { + $this->description = $description; + + return $this; + } + /** * Get type * * @return string */ - public function getType() + public function getType(): string { return $this->type; } + + /** + * Get description + * + * @return string + */ + public function getDescription(): ?string + { + return $this->description; + } } diff --git a/src/Entity/Flash.php b/src/Entity/Flash.php index 3cdb868..0e0782c 100644 --- a/src/Entity/Flash.php +++ b/src/Entity/Flash.php @@ -20,7 +20,6 @@ class Flash * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="SEQUENCE") - * @ORM\SequenceGenerator(sequenceName="camera.flash_id_seq", allocationSize=1, initialValue=1) */ private $id; diff --git a/src/Entity/Lenses.php b/src/Entity/Lenses.php index 3f9741c..9072f49 100644 --- a/src/Entity/Lenses.php +++ b/src/Entity/Lenses.php @@ -19,8 +19,7 @@ class Lenses * * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id - * @ORM\GeneratedValue(strategy="SEQUENCE") - * @ORM\SequenceGenerator(sequenceName="camera.lenses_id_seq", allocationSize=1, initialValue=1) + * @ORM\GeneratedValue(strategy="AUTO") */ private $id; diff --git a/src/Entity/PreviouslyOwnedFlash.php b/src/Entity/PreviouslyOwnedFlash.php index bb15b22..0237772 100644 --- a/src/Entity/PreviouslyOwnedFlash.php +++ b/src/Entity/PreviouslyOwnedFlash.php @@ -20,7 +20,6 @@ class PreviouslyOwnedFlash * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="SEQUENCE") - * @ORM\SequenceGenerator(sequenceName="camera.previously_owned_flash_id_seq", allocationSize=1, initialValue=1) */ private $id; diff --git a/src/Entity/PreviouslyOwnedLenses.php b/src/Entity/PreviouslyOwnedLenses.php index dab70f3..7c35da3 100644 --- a/src/Entity/PreviouslyOwnedLenses.php +++ b/src/Entity/PreviouslyOwnedLenses.php @@ -19,7 +19,6 @@ class PreviouslyOwnedLenses * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="SEQUENCE") - * @ORM\SequenceGenerator(sequenceName="camera.previously_owned_lenses_id_seq", allocationSize=1, initialValue=1) */ private $id; diff --git a/src/Entity/PurchasePriceTrait.php b/src/Entity/PurchasePriceTrait.php index 4a15ea8..864c45f 100644 --- a/src/Entity/PurchasePriceTrait.php +++ b/src/Entity/PurchasePriceTrait.php @@ -9,9 +9,9 @@ trait PurchasePriceTrait * * @param string $purchasePrice * - * @return Camera + * @return self */ - public function setPurchasePrice($purchasePrice) + public function setPurchasePrice($purchasePrice): self { $this->purchasePrice = $purchasePrice;