2018-04-05 15:05:04 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace AppBundle\Entity;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ORM\Entity(repositoryClass="AppBundle\Repository\ProductRepository")
|
|
|
|
*/
|
|
|
|
class ProductSold extends Product {
|
|
|
|
|
|
|
|
/**
|
2018-04-10 10:16:23 +02:00
|
|
|
* the stack of products for one client at one time
|
2018-04-05 16:40:40 +02:00
|
|
|
* @ORM\ManyToOne(targetEntity="SellRecord", inversedBy="productsSold")
|
2018-04-05 15:05:04 +02:00
|
|
|
*/
|
2018-04-10 10:16:23 +02:00
|
|
|
public $sellRecords;
|
2018-04-05 15:05:04 +02:00
|
|
|
|
2018-04-05 16:40:40 +02:00
|
|
|
/**
|
2018-04-10 10:16:23 +02:00
|
|
|
* person who recorded the sell
|
2018-04-05 16:40:40 +02:00
|
|
|
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\User", inversedBy="productsSold")
|
|
|
|
*/
|
|
|
|
private $user;
|
2018-04-10 10:16:23 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* references the product from whom this line is inspired
|
|
|
|
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Product", inversedBy="productsSold")
|
|
|
|
*/
|
|
|
|
private $product;
|
|
|
|
/**
|
|
|
|
* @ORM\ManyToOne(targetEntity="ProductCategory", inversedBy="products")
|
|
|
|
*/
|
|
|
|
private $category;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function getCategory() {
|
|
|
|
return $this->category;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param mixed $category
|
|
|
|
*/
|
|
|
|
public function setCategory( $category ) {
|
|
|
|
$this->category = $category;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function getSellRecords() {
|
|
|
|
return $this->sellRecords;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param mixed $sellRecords
|
|
|
|
*/
|
|
|
|
public function setSellRecords( $sellRecords ) {
|
|
|
|
$this->sellRecords = $sellRecords;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function getUser() {
|
|
|
|
return $this->user;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param mixed $user
|
|
|
|
*/
|
|
|
|
public function setUser( $user ) {
|
|
|
|
$this->user = $user;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function getProduct() {
|
|
|
|
return $this->product;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param mixed $product
|
|
|
|
*/
|
|
|
|
public function setProduct( $product ) {
|
|
|
|
$this->product = $product;
|
|
|
|
}
|
|
|
|
|
2018-04-05 15:05:04 +02:00
|
|
|
}
|