66 lines
1.1 KiB
PHP
66 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
|
|
|
/**
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="service_charge")
|
|
*/
|
|
class ServiceCharge
|
|
{
|
|
// unique id
|
|
/**
|
|
* @ORM\Id
|
|
* @ORM\Column(type="integer")
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
*/
|
|
protected $id;
|
|
|
|
// name
|
|
/**
|
|
* @ORM\Column(type="string", length=80)
|
|
* @Assert\NotBlank()
|
|
*/
|
|
protected $name;
|
|
|
|
// amount
|
|
/**
|
|
* @ORM\Column(type="decimal", precision=9, scale=2)
|
|
*/
|
|
protected $amount;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->amount = 0;
|
|
}
|
|
|
|
public function getID()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function setName($name)
|
|
{
|
|
$this->name = $name;
|
|
return $this;
|
|
}
|
|
|
|
public function getName()
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function setAmount($amount)
|
|
{
|
|
$this->amount = $amount;
|
|
return $this;
|
|
}
|
|
|
|
public function getAmount()
|
|
{
|
|
return $this->amount;
|
|
}
|
|
}
|