Commit 9c0e65f6 authored by philippepary's avatar philippepary
Browse files

Added Tax model

parent 5c800687
......@@ -3,7 +3,9 @@ require(__DIR__ . "/../vendor/autoload.php");
$files = [
"../src/http/public/index.php",
"../src/lib/Model/Category.php",
"../src/lib/Model/Product.php",
"../src/lib/Model/Tax.php",
];
$dirs = [
"../src/http/routes/",
......
......@@ -26,9 +26,13 @@ use \Pasteque\Server\System\DAO\DoctrineModel;
/**
* Class Tax
* @package Pasteque
* @SWG\Definition(type="object")
* @Entity
* @Table(name="taxes")
* @rest\model Tax
* @rest\description A tax that applies to products
* @rest\property Int id ID of the tax
* @rest\property String label Full name of the tax
* @rest\property Float rate Rate of the tax (between 0 and 1)
*/
class Tax extends DoctrineModel
{
......@@ -43,7 +47,6 @@ class Tax extends DoctrineModel
/**
* ID of the tax
* @var integer
* @SWG\Property()
* @Id @Column(type="integer")
* @GeneratedValue
*/
......@@ -53,7 +56,6 @@ class Tax extends DoctrineModel
/**
* Label of the tax
* @var string
* @SWG\Property()
* @Column(type="string")
*/
private $label;
......@@ -63,7 +65,6 @@ class Tax extends DoctrineModel
/**
* Rate of the tax
* @var float
* @SWG\Property()
* @Column(type="float")
*/
private $rate;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment