<?php
namespace App\Entity;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass="App\Repository\CosteRepository")
* @ORM\Table(name="coste", schema="perseo")
* @ORM\EntityListeners({"App\EntityListener\CosteVenta\CalcularPrecioTotalRelojListener"})
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=true)
*/
class Coste
{
/**
* @ORM\Id
* @ORM\Column(type="bigint", options={"unsigned":true})
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="float", nullable=false, precision=2, options={"default":"0.00"})
*/
protected $precio;
/**
* @ORM\Column(type="text", nullable=true)
*/
protected $descripcion;
/**
* @ORM\Column(type="datetime", nullable=true, name="deleted_at")
*/
protected $deletedAt;
/**
* @ORM\Column(type="datetime", nullable=false, name="updated_at", options={"default":"2022-01-01 00:00:00"})
* @Gedmo\Timestampable(on="update")
*/
protected $updatedAt;
/**
* @ORM\Column(type="datetime", nullable=false, name="created_at", options={"default":"2022-01-01 00:00:00"})
* @Gedmo\Timestampable(on="create")
*/
protected $createdAt;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\TipoCargoAbstract", inversedBy="costes")
* @ORM\JoinColumn(name="tipo_cargo_id", referencedColumnName="id")
*/
protected $tipoCargo;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\ValoracionesRelojes", inversedBy="costes")
* @ORM\JoinColumn(name="valoraciones_relojes_id", referencedColumnName="id")
*/
protected $valoracionesRelojes;
public function __toString(): string
{
return $this->getDescripcion();
}
public function getId(): ?string
{
return $this->id;
}
public function setId(int $id): self
{
$this->id = $id;
return $this;
}
public function getPrecio(): ?float
{
return $this->precio;
}
public function setPrecio(float $precio): self
{
$this->precio = $precio;
return $this;
}
public function getDescripcion(): ?string
{
return $this->descripcion;
}
public function setDescripcion(?string $descripcion): self
{
$this->descripcion = $descripcion;
return $this;
}
public function getDeletedAt(): ?\DateTimeInterface
{
return $this->deletedAt;
}
public function setDeletedAt(?\DateTimeInterface $deletedAt): self
{
$this->deletedAt = $deletedAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getTipoCargo(): ?TipoCargoAbstract
{
return $this->tipoCargo;
}
public function setTipoCargo(?TipoCargoAbstract $tipoCargo): self
{
$this->tipoCargo = $tipoCargo;
return $this;
}
public function getValoracionesRelojes(): ?ValoracionesRelojes
{
return $this->valoracionesRelojes;
}
public function setValoracionesRelojes(?ValoracionesRelojes $valoracionesRelojes): self
{
$this->valoracionesRelojes = $valoracionesRelojes;
return $this;
}
}