<?php
namespace App\Entity\System;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="product_document")
*
* @ORM\Entity(repositoryClass="App\Repository\System\ProductDocumentRepository")
*/
class ProductDocument
{
/**
* @var int
*
* @ORM\Id
*
* @ORM\GeneratedValue()
*
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var ProductDocumentType
*
* @ORM\ManyToOne(targetEntity="ProductDocumentType")
*/
private $type;
/**
* @var Product
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Product")
*
* @ORM\JoinColumn(name="product_id", referencedColumnName="id_product")
*/
private $product;
/**
* @var string
*
* @ORM\Column(type="string", nullable=false)
*/
private $fileName;
/**
* @var string
*
* @ORM\Column(type="string", nullable=false)
*/
private $filePath;
/**
* @var string
*
* @ORM\Column(type="string", length=10)
*/
private $fileType;
/**
* @var Language[]
*
* @ORM\ManyToMany(targetEntity="App\Entity\System\Language")
*
* @ORM\JoinTable(
* name="product_document_lang",
* joinColumns={@ORM\JoinColumn(name="document_id", referencedColumnName="id", fieldName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="language_id", referencedColumnName="id_lang", fieldName="id")}
* )
*/
private $languages;
public function getId(): int
{
return $this->id;
}
public function getType(): ProductDocumentType
{
return $this->type;
}
public function setType(ProductDocumentType $type): void
{
$this->type = $type;
}
public function getProduct(): Product
{
return $this->product;
}
public function setProduct(Product $product): void
{
$this->product = $product;
}
public function getLanguages(): array
{
return $this->languages;
}
public function setLanguages(array $languages): void
{
$this->languages = $languages;
}
public function getFileName(): string
{
return $this->fileName;
}
public function setFileName(string $fileName): ProductDocument
{
$this->fileName = $fileName;
return $this;
}
public function getFilePath(): string
{
return $this->filePath;
}
public function setFilePath(string $filePath): ProductDocument
{
$this->filePath = $filePath;
return $this;
}
public function getFileType(): string
{
return $this->fileType;
}
public function setFileType(string $fileType): ProductDocument
{
$this->fileType = $fileType;
return $this;
}
}