<?php
namespace App\Entity\OnlineShop;
use App\Entity\AbstractBase;
use App\Entity\OnlineShop\SupplierDocument;
use App\Entity\User;
use App\Repository\OnlineShop\SupplierDocumentDownloadRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="vulco_supplier_document_download", uniqueConstraints={@ORM\UniqueConstraint(name="supplier_document_download_search_idx", columns={"document_id", "user_id"})})
* @ORM\Entity(repositoryClass=SupplierDocumentDownloadRepository::class)
*/
class SupplierDocumentDownload extends AbstractBase
{
/**
* @ORM\ManyToOne(targetEntity="App\Entity\OnlineShop\SupplierDocument", inversedBy="downloads")
* @ORM\JoinColumn(name="document_id", referencedColumnName="id")
*/
private SupplierDocument $document;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="supplierDocumentDownloads")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
private User $user;
public function getDocument(): SupplierDocument
{
return $this->document;
}
public function setDocument(SupplierDocument $document): self
{
$this->document = $document;
return $this;
}
public function getUser(): User
{
return $this->user;
}
public function setUser(User $user): self
{
$this->user = $user;
return $this;
}
}