<?php
/**
* Service class represents simple model of Module entity
*
* $Project: Alliancemarkets2 $
* $Id$
*
* @package alliancemarkets2
* @author George Matyas <webexciter@yahoo.com>
* @version $Revision$
*/
namespace App\Entity;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Service;
use ApiPlatform\Metadata\ApiResource;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Translatable\Translatable;
use Symfony\Contracts\Translation\TranslatorInterface;
//use Symfony\Contracts\Translation\TranslatableInterface;
/**
* @ORM\Entity(repositoryClass="App\EntityRepo\ModuleRepo")
* @ORM\Table(name="module")
* @Gedmo\TranslationEntity(class="App\Entity\ModuleTranslation")
*/
#[ApiResource]
class Module implements Translatable
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $moduleId=0;
/**
* @ORM\Column(type="string", length=100)
*/
protected $moduleName;
/**
* @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, nullable=true)
*/
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, nullable=true)
*/
protected $registerUrl;
/**
* @ORM\Column(type="float", nullable=true)
*/
protected $price;
/*
* Many Modules have Many Service.
* @ManyToMany(targetEntity="Service", mappedBy="modules")
*/
/*
protected $services;
public function __construct() {
$this->services = new \Doctrine\Common\Collections\ArrayCollection();
}
*/
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
protected $backgroundImage;
/**
* @Gedmo\Translatable
* @ORM\Column(type="text", nullable=true)
*/
protected $moduleDescription;
/**
* Get moduleId
*
* @return integer
*/
public function getModuleId()
{
return $this->moduleId;
}
/**
* Set moduleName
*
* @param string $moduleName
*
* @return Module
*/
public function setModuleName($moduleName)
{
$this->moduleName = $moduleName;
return $this;
}
/**
* Get moduleName
*
* @return string
*/
public function getModuleName()
{
return $this->moduleName;
}
/**
* Set action
*
* @param string $action
*
* @return Module
*/
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 Module
*/
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 Module
*/
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 Module
*/
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 Module
*/
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 Module
*/
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 Module
*/
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 Module
*/
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 Module
*/
public function setPrice($price)
{
$this->price = $price;
return $this;
}
/**
* Get price
*
* @return float
*/
public function getPrice()
{
return $this->price;
}
/**
* Set backgroundImage
*
* @param string $backgroundImage
*
* @return Module
*/
public function setBackgroundImage($backgroundImage)
{
$this->backgroundImage = $backgroundImage;
return $this;
}
/**
* Get backgroundImage
*
* @return string
*/
public function getBackgroundImage()
{
return $this->backgroundImage;
}
/**
* Set moduleDescription
*
* @param string $moduleDescription
*
* @return Module
*/
public function setModuleDescription($moduleDescription)
{
$this->moduleDescription = $moduleDescription;
return $this;
}
/**
* Get moduleDescription
*
* @return string
*/
public function getModuleDescription()
{
return $this->moduleDescription;
}
}