mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-06-20 01:44:42 +02:00
up to sf 7
This commit is contained in:
parent
a39b6239b0
commit
501795a8fa
16586 changed files with 19384005 additions and 0 deletions
247
v1/old/Entity/SellRecord.php~
Executable file
247
v1/old/Entity/SellRecord.php~
Executable file
|
@ -0,0 +1,247 @@
|
|||
<?php
|
||||
|
||||
namespace AppBundle\Entity;
|
||||
|
||||
use AppBundle\Traits\Commentable;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass="AppBundle\Repository\SellRecordRepository")
|
||||
*/
|
||||
class SellRecord {
|
||||
|
||||
use Commentable;
|
||||
/**
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
/**
|
||||
* gender of the client
|
||||
* @ORM\Column( type = "string", nullable=true )
|
||||
*/
|
||||
private $gender;
|
||||
/**
|
||||
* liste des produits de la vente
|
||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\ProductSold", mappedBy="sellRecords", cascade={"remove", "persist","detach"})
|
||||
*/
|
||||
private $productsSold;
|
||||
|
||||
|
||||
/**
|
||||
* creation date
|
||||
* @ORM\Column(type="datetime")
|
||||
*/
|
||||
private $date;
|
||||
|
||||
/**
|
||||
* total
|
||||
* @ORM\Column(type="decimal", scale=2, nullable=false)
|
||||
*/
|
||||
private $amount;
|
||||
/**
|
||||
* amount paid by client
|
||||
* @ORM\Column(type="decimal", scale=2, nullable=true)
|
||||
*/
|
||||
private $paidByClient;
|
||||
|
||||
/**
|
||||
* @var
|
||||
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Festival",inversedBy="sellRecords")
|
||||
*/
|
||||
private $festival;
|
||||
|
||||
/**
|
||||
* owner of the selling account
|
||||
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\User", inversedBy="sellRecords")
|
||||
*/
|
||||
private $user;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->productsSold = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getId() {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $id
|
||||
*/
|
||||
public function setId( $id ) {
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set date
|
||||
*
|
||||
* @param \DateTime $date
|
||||
*
|
||||
* @return SellRecord
|
||||
*/
|
||||
public function setDate( $date ) {
|
||||
$this->date = $date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get date
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getDate() {
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set amount
|
||||
*
|
||||
* @param string $amount
|
||||
*
|
||||
* @return SellRecord
|
||||
*/
|
||||
public function setAmount( $amount ) {
|
||||
$this->amount = $amount;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get amount
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAmount() {
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set paidByClient
|
||||
*
|
||||
* @param string $paidByClient
|
||||
*
|
||||
* @return SellRecord
|
||||
*/
|
||||
public function setPaidByClient( $paidByClient ) {
|
||||
$this->paidByClient = $paidByClient;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get paidByClient
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPaidByClient() {
|
||||
return $this->paidByClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add productsSold
|
||||
*
|
||||
* @param \AppBundle\Entity\ProductSold $productsSold
|
||||
*
|
||||
* @return SellRecord
|
||||
*/
|
||||
public function addProductsSold( \AppBundle\Entity\ProductSold $productsSold ) {
|
||||
$this->productsSold[] = $productsSold;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove productsSold
|
||||
*
|
||||
* @param \AppBundle\Entity\ProductSold $productsSold
|
||||
*/
|
||||
public function removeProductsSold( \AppBundle\Entity\ProductSold $productsSold ) {
|
||||
$this->productsSold->removeElement( $productsSold );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get productsSold
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getProductsSold() {
|
||||
return $this->productsSold;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set festival
|
||||
*
|
||||
* @param \AppBundle\Entity\Festival $festival
|
||||
*
|
||||
* @return SellRecord
|
||||
*/
|
||||
public function setFestival( \AppBundle\Entity\Festival $festival = null ) {
|
||||
$this->festival = $festival;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get festival
|
||||
*
|
||||
* @return \AppBundle\Entity\Festival
|
||||
*/
|
||||
public function getFestival() {
|
||||
return $this->festival;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set user
|
||||
*
|
||||
* @param \AppBundle\Entity\User $user
|
||||
*
|
||||
* @return SellRecord
|
||||
*/
|
||||
public function setUser( \AppBundle\Entity\User $user = null ) {
|
||||
$this->user = $user;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user
|
||||
*
|
||||
* @return \AppBundle\Entity\User
|
||||
*/
|
||||
public function getUser() {
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set gender.
|
||||
*
|
||||
* @param string|null $gender
|
||||
*
|
||||
* @return SellRecord
|
||||
*/
|
||||
public function setGender($gender = null)
|
||||
{
|
||||
$this->gender = $gender;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get gender.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getGender()
|
||||
{
|
||||
return $this->gender;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue