<?php
/**
* Service class represents simple model of Service entity
*
* $Project: Alliancemarkets2 $
* $Id$
*
* @package alliancemarkets2
* @author George Matyas <webexciter@yahoo.com>
* @version $Revision$
*/
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
/**
* @ORM\Entity(repositoryClass="App\EntityRepo\ServiceRepo")
* @ORM\Table(name="service")
*/
#[ApiResource]
class Service
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $serviceId=0;
/**
* @ORM\Column(type="string", length=100)
*/
protected $serviceName;
/**
* @ORM\Column(type="string", length=100)
*/
protected $action;
/**
* @ORM\Column(type="string", length=100)
*/
protected $serviceType;
/**
* @ORM\Column(type="integer")
*/
protected $isLive=1;
/**
* @ORM\Column(type="string", length=255)
*/
protected $image;
/**
* @ORM\Column(type="integer")
*/
protected $importance=3;
/**
* @ORM\Column(type="integer")
*/
protected $trialMonths=3;
/**
* @ORM\Column(type="string", length=255)
*/
protected $landingUrl;
/**
* @ORM\Column(type="string", length=255)
*/
protected $registerUrl;
/**
* @ORM\Column(type="float")
*/
protected $price;
/*
* @ORM\ManyToMany(targetEntity="Product",cascade={"persist"})
* @ORM\JoinTable(name="service_product",
* joinColumns={@ORM\JoinColumn(name="service_id", referencedColumnName="service_id")},
* inverseJoinColumns={@ORM\JoinColumn(name="product_id", referencedColumnName="product_id", unique=false)}
* )
*/
/**
* @ORM\ManyToMany(targetEntity="Module",cascade={"persist"})
* @ORM\JoinTable(name="service_module",
* joinColumns={@ORM\JoinColumn(name="service_id", referencedColumnName="service_id")},
* inverseJoinColumns={@ORM\JoinColumn(name="module_id", referencedColumnName="module_id", unique=false)}
* )
*/
protected $modules;
/**
* @ORM\Column(type="string", length=255)
*/
protected $backgroundImage;
/**
* Constructor
*/
public function __construct()
{
$this->modules = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get serviceId
*
* @return integer
*/
public function getServiceId()
{
return $this->serviceId;
}
/**
* Set serviceName
*
* @param string $serviceName
*
* @return Service
*/
public function setServiceName($serviceName)
{
$this->serviceName = $serviceName;
return $this;
}
/**
* Get serviceName
*
* @return string
*/
public function getServiceName()
{
return $this->serviceName;
}
/**
* Set action
*
* @param string $action
*
* @return Service
*/
public function setAction($action)
{
$this->action = $action;
return $this;
}
/**
* Get action
*
* @return string
*/
public function getAction()
{
return $this->action;
}
/**
* Set serviceType
*
* @param string $serviceType
*
* @return Service
*/
public function setServiceType($serviceType)
{
$this->serviceType = $serviceType;
return $this;
}
/**
* Get serviceType
*
* @return string
*/
public function getServiceType()
{
return $this->serviceType;
}
/**
* Set isLive
*
* @param integer $isLive
*
* @return Service
*/
public function setIsLive($isLive)
{
$this->isLive = $isLive;
return $this;
}
/**
* Get isLive
*
* @return integer
*/
public function getIsLive()
{
return $this->isLive;
}
/**
* Set image
*
* @param string $image
*
* @return Service
*/
public function setImage($image)
{
$this->image = $image;
return $this;
}
/**
* Get image
*
* @return string
*/
public function getImage()
{
return $this->image;
}
/**
* Set importance
*
* @param integer $importance
*
* @return Service
*/
public function setImportance($importance)
{
$this->importance = $importance;
return $this;
}
/**
* Get importance
*
* @return integer
*/
public function getImportance()
{
return $this->importance;
}
/**
* Set trialMonths
*
* @param integer $trialMonths
*
* @return Service
*/
public function setTrialMonths($trialMonths)
{
$this->trialMonths = $trialMonths;
return $this;
}
/**
* Get trialMonths
*
* @return integer
*/
public function getTrialMonths()
{
return $this->trialMonths;
}
/**
* Set landingUrl
*
* @param string $landingUrl
*
* @return Service
*/
public function setLandingUrl($landingUrl)
{
$this->landingUrl = $landingUrl;
return $this;
}
/**
* Get landingUrl
*
* @return string
*/
public function getLandingUrl()
{
return $this->landingUrl;
}
/**
* Set registerUrl
*
* @param string $registerUrl
*
* @return Service
*/
public function setRegisterUrl($registerUrl)
{
$this->registerUrl = $registerUrl;
return $this;
}
/**
* Get registerUrl
*
* @return string
*/
public function getRegisterUrl()
{
return $this->registerUrl;
}
/**
* Set price
*
* @param float $price
*
* @return Service
*/
public function setPrice($price)
{
$this->price = $price;
return $this;
}
/**
* Get price
*
* @return float
*/
public function getPrice()
{
return $this->price;
}
/**
* Set parent
*
* @param \App\Entity\Service $parent
*
* @return Service
*/
public function setParent(\App\Entity\Service $parent = null)
{
$this->parent = $parent;
return $this;
}
/**
* Get parent
*
* @return \App\Entity\Service
*/
public function getParent()
{
return $this->parent;
}
/**
* Add child
*
* @param \App\Entity\Service $child
*
* @return Service
*/
public function addChild(\App\Entity\Service $child)
{
$this->children[] = $child;
return $this;
}
/**
* Remove child
*
* @param \App\Entity\Service $child
*/
public function removeChild(\App\Entity\Service $child)
{
$this->children->removeElement($child);
}
/**
* Get children
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getChildren()
{
return $this->children;
}
/**
* Set parents
*
* @param \App\Entity\Service $parents
*
* @return Service
*/
public function setParents(\App\Entity\Service $parents = null)
{
$this->parents = $parents;
return $this;
}
/**
* Get parents
*
* @return \App\Entity\Service
*/
public function getParents()
{
return $this->parents;
}
/**
* Get child
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getChild()
{
return $this->child;
}
/**
* Set parentId
*
* @param integer $parentId
*
* @return Service
*/
public function setParentId($parentId)
{
$this->parentId = $parentId;
return $this;
}
/**
* Get parentId
*
* @return integer
*/
public function getParentId()
{
return $this->parentId;
}
/**
* Add parent
*
* @param \App\Entity\Product $parent
*
* @return Service
*/
public function addParent(\App\Entity\Product $parent)
{
$this->parents[] = $parent;
return $this;
}
/**
* Remove parent
*
* @param \App\Entity\Product $parent
*/
public function removeParent(\App\Entity\Product $parent)
{
$this->parents->removeElement($parent);
}
/**
* Add module
*
* @param \App\Entity\Module $module
*
* @return Service
*/
public function addModule(\App\Entity\Module $module)
{
$this->modules[] = $module;
return $this;
}
/**
* Remove module
*
* @param \App\Entity\Module $module
*/
public function removeModule(\App\Entity\Module $module)
{
$this->modules->removeElement($module);
}
/**
* Get modules
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getModules()
{
return $this->modules;
}
/**
* Set backgroundImage
*
* @param string $backgroundImage
*
* @return Service
*/
public function setBackgroundImage($backgroundImage)
{
$this->backgroundImage = $backgroundImage;
return $this;
}
/**
* Get backgroundImage
*
* @return string
*/
public function getBackgroundImage()
{
return $this->backgroundImage;
}
}