<?php
namespace App\Entity\Statistics;
use App\Entity\AbstractBase;
use App\Entity\Garages\Garage;
use App\Entity\Traits\GarageTrait;
use App\Entity\User;
use App\Repository\Statistics\StockStatisticRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Table(name="vulco_stock_statistic")
*
* @ORM\Entity(repositoryClass=StockStatisticRepository::class)
*
* @Gedmo\SoftDeleteable(fieldName="removedAt", timeAware=false)
*/
class StockStatistic extends AbstractBase
{
use GarageTrait;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $sapCode = null;
/**
* @Assert\NotBlank()
*
* @ORM\Column(type="string", length=255, nullable=false)
*/
private string $code;
/**
* @Assert\NotBlank()
*
* @ORM\Column(type="integer")
*/
private int $quantity;
/**
* @Assert\NotBlank()
*
* @ORM\Column(type="string", length=255, nullable=false)
*/
private string $brand;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Garages\Garage")
*
* @ORM\JoinColumn(name="garage_id", referencedColumnName="id")
*/
private Garage $garage;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User")
*
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
private User $user;
/**
* @ORM\Column(type="datetime", nullable=false)
*/
private \DateTimeInterface $importedOn;
public function getSapCode(): ?string
{
return $this->sapCode;
}
public function setSapCode(?string $sapCode): self
{
$this->sapCode = $sapCode;
return $this;
}
public function getCode(): string
{
return $this->code;
}
public function setCode(string $code): self
{
$this->code = $code;
return $this;
}
public function getQuantity(): int
{
return $this->quantity;
}
public function setQuantity(int $quantity): self
{
$this->quantity = $quantity;
return $this;
}
public function getBrand(): string
{
return $this->brand;
}
public function setBrand(string $brand): self
{
$this->brand = $brand;
return $this;
}
public function getUser(): User
{
return $this->user;
}
public function setUser(User $user): self
{
$this->user = $user;
return $this;
}
public function getImportedOn(): \DateTimeInterface
{
return $this->importedOn;
}
public function setImportedOn(\DateTimeInterface $importedOn): self
{
$this->importedOn = $importedOn;
return $this;
}
}