Add countAds
This commit is contained in:
@@ -48,7 +48,7 @@ class Company
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*
|
||||
* @Groups({ "company_list", "company_detail"})
|
||||
* @Groups({ "ad_detail", "company_list", "company_detail"})
|
||||
*/
|
||||
private $id;
|
||||
|
||||
@@ -112,7 +112,7 @@ class Company
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity="AppBundle\Entity\Media", cascade={"persist", "remove"})
|
||||
* @ORM\JoinColumn(name="presentation_video_id", nullable=true)
|
||||
* @Groups({"company_detail"})
|
||||
* @Groups({"ad_detail", "company_detail", "company_list"})
|
||||
*/
|
||||
private $presentationVideo;
|
||||
|
||||
@@ -169,7 +169,7 @@ class Company
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Ad",mappedBy="company", cascade={"persist", "remove"})
|
||||
* @Groups({"company_detail"})
|
||||
* @Groups({"company_detail", "company_list"})
|
||||
*/
|
||||
private $ads;
|
||||
|
||||
@@ -186,9 +186,16 @@ class Company
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Answer",mappedBy="company", cascade={"persist", "remove"})
|
||||
*
|
||||
* @Groups({"company_detail", "company_list"})
|
||||
*/
|
||||
private $spontaneousApplications;
|
||||
|
||||
/**
|
||||
* @Groups({"company_detail", "company_list"})
|
||||
*/
|
||||
private $countAds;
|
||||
|
||||
/***********************
|
||||
* Constructor
|
||||
***********************/
|
||||
@@ -902,4 +909,28 @@ class Company
|
||||
{
|
||||
return $this->isPrivate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set countAds.
|
||||
*
|
||||
* @param int|null $countAds
|
||||
*
|
||||
* @return Company
|
||||
*/
|
||||
public function setCountAds($countAds = null)
|
||||
{
|
||||
$this->countAds = $countAds;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get countAds.
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getCountAds()
|
||||
{
|
||||
return $this->countAds;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user