Commit 5c800687 authored by philippepary's avatar philippepary
Browse files

Added Category model

parent f957607f
......@@ -26,9 +26,16 @@ use \Pasteque\Server\System\DAO\DoctrineModel;
/**
* Class Category
* @package Pasteque
* @SWG\Definition(type="object")
* @Entity
* @Table(name="categories")
* @rest\model Category
* @rest\description A category of products
* @rest\property Int id Internal ID of category for performances optimisation
* @rest\property String reference Code of the category, user-friendly ID
* @rest\property Int parent Parent's category ID, if any
* @rest\property String label Full name of the category
* @rest\property Boolean hasImage True if category has a custom image
* @rest\property Int dispOrder Display order in cash registers
*/
class Category extends DoctrineModel
{
......@@ -53,7 +60,6 @@ class Category extends DoctrineModel
/**
* Internal ID of the category for performance issues.
* @var integer
* @SWG\Property()
* @Id @Column(type="integer")
* @GeneratedValue
*/
......@@ -64,7 +70,6 @@ class Category extends DoctrineModel
* Code of the category, user-friendly ID.
* It is automatically set from label if not explicitely set.
* @var string
* @SWG\Property()
* @Column(type="string", unique=true)
*/
protected $reference;
......@@ -74,7 +79,6 @@ class Category extends DoctrineModel
/**
* Parent's category if any.
* @var integer
* @SWG\Property()
* @ManyToOne(targetEntity="Category", inversedBy="children")
* @JoinColumn(name="parent_id", referencedColumnName="id") */
protected $parent;
......@@ -90,7 +94,6 @@ class Category extends DoctrineModel
/**
* Label of the category
* @var string
* @SWG\Property()
* @Column(type="string")
*/
protected $label;
......@@ -105,7 +108,6 @@ class Category extends DoctrineModel
/**
* True if an image can be found for this model.
* @var bool
* @SWG\Property()
* @Column(type="boolean")
*/
protected $hasImage = false;
......@@ -116,7 +118,6 @@ class Category extends DoctrineModel
/**
* Order of display of the category
* @var int order
* @SWG\Property(format="int32")
* @Column(type="integer", name="disp_order")
*/
protected $dispOrder = 0;
......
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