Add outletcounter entity
This commit is contained in:
parent
884cd7b7f1
commit
a6b1252f73
1 changed files with 74 additions and 0 deletions
74
src/Entity/OutletCounter.php
Normal file
74
src/Entity/OutletCounter.php
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Entity
|
||||||
|
* @ORM\Table(name="outlet_counter")
|
||||||
|
*/
|
||||||
|
class OutletCounter
|
||||||
|
{
|
||||||
|
// identifying string
|
||||||
|
// format is "YYYYMMDD-XXX", where XXX is the outlet id
|
||||||
|
/**
|
||||||
|
* @ORM\Id
|
||||||
|
* @ORM\Column(type="string", length=15)
|
||||||
|
* @Assert\NotBlank()
|
||||||
|
*/
|
||||||
|
protected $id;
|
||||||
|
|
||||||
|
// sales counter
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
*/
|
||||||
|
protected $count_sales;
|
||||||
|
|
||||||
|
// service counter
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
*/
|
||||||
|
protected $count_service;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->count_sales = 0;
|
||||||
|
$this->count_service = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getID()
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setID($id)
|
||||||
|
{
|
||||||
|
$this->id = $id;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSalesCounter()
|
||||||
|
{
|
||||||
|
return $this->count_sales;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setSalesCounter($count_sales)
|
||||||
|
{
|
||||||
|
$this->count_sales = $count_sales;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getServiceCounter()
|
||||||
|
{
|
||||||
|
return $this->count_service;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setServiceCounter($count_service)
|
||||||
|
{
|
||||||
|
$this->count_service = $count_service;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue