src/Entity/CRM/PurchaseInvoice.php line 14
<?phpnamespace App\Entity\CRM;use App\Repository\PurchaseInvoiceRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\HttpFoundation\File\File;use Vich\UploaderBundle\Mapping\Annotation as Vich;#[ORM\Entity(repositoryClass: PurchaseInvoiceRepository::class)]#[ORM\Table(name: 'purchase_invoices')]#[Vich\Uploadable]class PurchaseInvoice{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(type: Types::DATE_MUTABLE)]private ?\DateTimeInterface $receiptDate = null;#[ORM\Column(type: Types::DATE_MUTABLE)]private ?\DateTimeInterface $invoiceDate = null;#[ORM\Column(length: 255)]private ?string $invoiceNumber = null;#[ORM\Column(length: 255)]private ?string $companyName = null;#[ORM\Column(type: Types::DECIMAL, precision: 10, scale: 2)]private ?string $netAmount = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $notes = null;#[ORM\Column(length: 255, nullable: true)]private ?string $fileName = null;#[Vich\UploadableField(mapping: 'purchase_invoices', fileNameProperty: 'fileName')]private ?File $invoiceFile = null;#[ORM\ManyToOne(targetEntity: Branch::class)]#[ORM\JoinColumn(nullable: false)]private ?Branch $branch = null;#[ORM\ManyToOne(targetEntity: Admin::class)]#[ORM\JoinColumn(nullable: false)]private ?Admin $admin = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $createdAt = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $updatedAt = null;#[ORM\Column(length: 255, nullable: true)]private ?string $type = null;#[ORM\Column]private ?int $registryNumber = null;#[ORM\Column(length: 255)]private ?string $companyInvoiceName = null;public function __construct(){$this->createdAt = new \DateTime();$this->updatedAt = new \DateTime();}public function getId(): ?int{return $this->id;}public function getReceiptDate(): ?\DateTimeInterface{return $this->receiptDate;}public function setReceiptDate(\DateTimeInterface $receiptDate): static{$this->receiptDate = $receiptDate;return $this;}public function getInvoiceDate(): ?\DateTimeInterface{return $this->invoiceDate;}public function setInvoiceDate(\DateTimeInterface $invoiceDate): static{$this->invoiceDate = $invoiceDate;return $this;}public function getInvoiceNumber(): ?string{return $this->invoiceNumber;}public function setInvoiceNumber(string $invoiceNumber): static{$this->invoiceNumber = $invoiceNumber;return $this;}public function getCompanyName(): ?string{return $this->companyName;}public function setCompanyName(string $companyName): static{$this->companyName = $companyName;return $this;}public function getNetAmount(): ?string{return $this->netAmount;}public function setNetAmount(string $netAmount): static{$this->netAmount = $netAmount;return $this;}public function getNotes(): ?string{return $this->notes;}public function setNotes(?string $notes): static{$this->notes = $notes;return $this;}public function getFileName(): ?string{return $this->fileName;}public function setFileName(?string $fileName): static{$this->fileName = $fileName;return $this;}public function getInvoiceFile(): ?File{return $this->invoiceFile;}public function setInvoiceFile(?File $invoiceFile = null): void{$this->invoiceFile = $invoiceFile;if (null !== $invoiceFile) {$this->updatedAt = new \DateTime();}}public function getBranch(): ?Branch{return $this->branch;}public function setBranch(?Branch $branch): static{$this->branch = $branch;return $this;}public function getAdmin(): ?Admin{return $this->admin;}public function setAdmin(?Admin $admin): static{$this->admin = $admin;return $this;}public function getCreatedAt(): ?\DateTimeInterface{return $this->createdAt;}public function setCreatedAt(\DateTimeInterface $createdAt): static{$this->createdAt = $createdAt;return $this;}public function getUpdatedAt(): ?\DateTimeInterface{return $this->updatedAt;}public function setUpdatedAt(\DateTimeInterface $updatedAt): static{$this->updatedAt = $updatedAt;return $this;}public function __toString(): string{return sprintf('%s - %s', $this->invoiceNumber, $this->companyName);}public function getType(): ?string{return $this->type;}public function setType(?string $type): static{$this->type = $type;return $this;}public function getRegistryNumber(): ?int{return $this->registryNumber;}public function setRegistryNumber(int $registryNumber): static{$this->registryNumber = $registryNumber;return $this;}public function getCompanyInvoiceName(): ?string{return $this->companyInvoiceName;}public function setCompanyInvoiceName(string $companyInvoiceName): static{$this->companyInvoiceName = $companyInvoiceName;return $this;}}