add ordoring field & Display Activity type by Category

This commit is contained in:
Jean-Francois Monfort
2021-05-06 11:53:07 +02:00
parent f836114d84
commit 1f1b9c594f
10 changed files with 134 additions and 17 deletions

View File

@@ -54,7 +54,7 @@ class ActivityType
private bool $active = true;
/**
* ORM\ManyToOne(targetEntity="Chill\ActivityBundle\Entity\ActivityTypeCategory")
* @ORM\ManyToOne(targetEntity="Chill\ActivityBundle\Entity\ActivityTypeCategory")
*/
private ?ActivityTypeCategory $category = null;
@@ -228,6 +228,11 @@ class ActivityType
*/
private string $socialDataLabel = '';
/**
* @ORM\Column(type="float", options={"default"="0.0"})
*/
private float $ordering = 0.0;
/**
* Get id
*/
@@ -665,4 +670,16 @@ class ActivityType
return $this->$property;
}
public function getOrdering(): float
{
return $this->ordering;
}
public function setOrdering(float $ordering): self
{
$this->ordering = $ordering;
return $this;
}
}

View File

@@ -49,6 +49,11 @@ class ActivityTypeCategory
*/
private bool $active = true;
/**
* @ORM\Column(type="float", options={"default"="0.0"})
*/
private float $ordering = 0.0;
/**
* Get id
*/
@@ -103,4 +108,16 @@ class ActivityTypeCategory
return $this;
}
public function getOrdering(): float
{
return $this->ordering;
}
public function setOrdering(float $ordering): self
{
$this->ordering = $ordering;
return $this;
}
}