src/Entity/Module.php line 30

Open in your IDE?
  1. <?php
  2. /**
  3.  * Service class represents simple model of Module entity
  4.  *
  5.  * $Project: Alliancemarkets2 $
  6.  * $Id$
  7.  *
  8.  * @package alliancemarkets2
  9.  * @author George Matyas <webexciter@yahoo.com>
  10.  * @version $Revision$
  11.  */
  12. namespace App\Entity;
  13. use Doctrine\DBAL\Types\Types;
  14. use Doctrine\ORM\Mapping as ORM;
  15. use App\Entity\Service;
  16. use ApiPlatform\Metadata\ApiResource;
  17. use Gedmo\Mapping\Annotation as Gedmo;
  18. use Gedmo\Translatable\Translatable;
  19. use Symfony\Contracts\Translation\TranslatorInterface;
  20. //use Symfony\Contracts\Translation\TranslatableInterface;
  21. /**
  22.  * @ORM\Entity(repositoryClass="App\EntityRepo\ModuleRepo")
  23.  * @ORM\Table(name="module")
  24.  * @Gedmo\TranslationEntity(class="App\Entity\ModuleTranslation")
  25.  */
  26. #[ApiResource]
  27. class Module implements Translatable
  28. {
  29.     /**
  30.      * @ORM\Column(type="integer")
  31.      * @ORM\Id
  32.      * @ORM\GeneratedValue(strategy="AUTO")
  33.      */ 
  34.     protected $moduleId=0;
  35.     /**
  36.      * @ORM\Column(type="string", length=100)
  37.      */
  38.     protected $moduleName;
  39.     /**
  40.      * @ORM\Column(type="string", length=100)
  41.      */    
  42.     protected $action;
  43.     /**
  44.      * @ORM\Column(type="string", length=100)
  45.      */    
  46.     protected $serviceType;    
  47.     /**
  48.      * @ORM\Column(type="integer")
  49.      */ 
  50.     protected $isLive=1;
  51.     /**
  52.      * @ORM\Column(type="string", length=255)
  53.      */    
  54.     protected $image
  55.     /**
  56.      * @ORM\Column(type="integer")
  57.      */ 
  58.     protected $importance=3;
  59.     /**
  60.      * @ORM\Column(type="integer")
  61.      */ 
  62.     protected $trialMonths=3;
  63.     /**
  64.      * @ORM\Column(type="string", length=255)
  65.      */    
  66.     protected $landingUrl
  67.     /**
  68.      * @ORM\Column(type="string", length=255)
  69.      */    
  70.     protected $registerUrl;    
  71.     /**
  72.      * @ORM\Column(type="float")
  73.      */    
  74.     protected $price
  75.  
  76.     /*
  77.      * Many Modules have Many Service.
  78.      * @ManyToMany(targetEntity="Service", mappedBy="modules")
  79.      */
  80.     
  81.     /*
  82.     protected $services;
  83.     
  84.     public function __construct() {
  85.         $this->services = new \Doctrine\Common\Collections\ArrayCollection();
  86.     } 
  87.     */   
  88.     /**
  89.      * @ORM\Column(type="string", length=255)
  90.      */    
  91.     protected $backgroundImage;  
  92.     /**
  93.      * @Gedmo\Translatable
  94.      * @ORM\Column(type="text", nullable=true)
  95.      */
  96.     protected $moduleDescription;  
  97.     /**
  98.      * Get moduleId
  99.      *
  100.      * @return integer
  101.      */
  102.     public function getModuleId()
  103.     {
  104.         return $this->moduleId;
  105.     }
  106.     /**
  107.      * Set moduleName
  108.      *
  109.      * @param string $moduleName
  110.      *
  111.      * @return Module
  112.      */
  113.     public function setModuleName($moduleName)
  114.     {
  115.         $this->moduleName $moduleName;
  116.         return $this;
  117.     }
  118.     /**
  119.      * Get moduleName
  120.      *
  121.      * @return string
  122.      */
  123.     public function getModuleName()
  124.     {
  125.         return $this->moduleName;
  126.     }
  127.     /**
  128.      * Set action
  129.      *
  130.      * @param string $action
  131.      *
  132.      * @return Module
  133.      */
  134.     public function setAction($action)
  135.     {
  136.         $this->action $action;
  137.         return $this;
  138.     }
  139.     /**
  140.      * Get action
  141.      *
  142.      * @return string
  143.      */
  144.     public function getAction()
  145.     {
  146.         return $this->action;
  147.     }
  148.     /**
  149.      * Set serviceType
  150.      *
  151.      * @param string $serviceType
  152.      *
  153.      * @return Module
  154.      */
  155.     public function setServiceType($serviceType)
  156.     {
  157.         $this->serviceType $serviceType;
  158.         return $this;
  159.     }
  160.     /**
  161.      * Get serviceType
  162.      *
  163.      * @return string
  164.      */
  165.     public function getServiceType()
  166.     {
  167.         return $this->serviceType;
  168.     }
  169.     /**
  170.      * Set isLive
  171.      *
  172.      * @param integer $isLive
  173.      *
  174.      * @return Module
  175.      */
  176.     public function setIsLive($isLive)
  177.     {
  178.         $this->isLive $isLive;
  179.         return $this;
  180.     }
  181.     /**
  182.      * Get isLive
  183.      *
  184.      * @return integer
  185.      */
  186.     public function getIsLive()
  187.     {
  188.         return $this->isLive;
  189.     }
  190.     /**
  191.      * Set image
  192.      *
  193.      * @param string $image
  194.      *
  195.      * @return Module
  196.      */
  197.     public function setImage($image)
  198.     {
  199.         $this->image $image;
  200.         return $this;
  201.     }
  202.     /**
  203.      * Get image
  204.      *
  205.      * @return string
  206.      */
  207.     public function getImage()
  208.     {
  209.         return $this->image;
  210.     }
  211.     /**
  212.      * Set importance
  213.      *
  214.      * @param integer $importance
  215.      *
  216.      * @return Module
  217.      */
  218.     public function setImportance($importance)
  219.     {
  220.         $this->importance $importance;
  221.         return $this;
  222.     }
  223.     /**
  224.      * Get importance
  225.      *
  226.      * @return integer
  227.      */
  228.     public function getImportance()
  229.     {
  230.         return $this->importance;
  231.     }
  232.     /**
  233.      * Set trialMonths
  234.      *
  235.      * @param integer $trialMonths
  236.      *
  237.      * @return Module
  238.      */
  239.     public function setTrialMonths($trialMonths)
  240.     {
  241.         $this->trialMonths $trialMonths;
  242.         return $this;
  243.     }
  244.     /**
  245.      * Get trialMonths
  246.      *
  247.      * @return integer
  248.      */
  249.     public function getTrialMonths()
  250.     {
  251.         return $this->trialMonths;
  252.     }
  253.     /**
  254.      * Set landingUrl
  255.      *
  256.      * @param string $landingUrl
  257.      *
  258.      * @return Module
  259.      */
  260.     public function setLandingUrl($landingUrl)
  261.     {
  262.         $this->landingUrl $landingUrl;
  263.         return $this;
  264.     }
  265.     /**
  266.      * Get landingUrl
  267.      *
  268.      * @return string
  269.      */
  270.     public function getLandingUrl()
  271.     {
  272.         return $this->landingUrl;
  273.     }
  274.     /**
  275.      * Set registerUrl
  276.      *
  277.      * @param string $registerUrl
  278.      *
  279.      * @return Module
  280.      */
  281.     public function setRegisterUrl($registerUrl)
  282.     {
  283.         $this->registerUrl $registerUrl;
  284.         return $this;
  285.     }
  286.     /**
  287.      * Get registerUrl
  288.      *
  289.      * @return string
  290.      */
  291.     public function getRegisterUrl()
  292.     {
  293.         return $this->registerUrl;
  294.     }
  295.     /**
  296.      * Set price
  297.      *
  298.      * @param float $price
  299.      *
  300.      * @return Module
  301.      */
  302.     public function setPrice($price)
  303.     {
  304.         $this->price $price;
  305.         return $this;
  306.     }
  307.     /**
  308.      * Get price
  309.      *
  310.      * @return float
  311.      */
  312.     public function getPrice()
  313.     {
  314.         return $this->price;
  315.     }
  316.     /**
  317.      * Set backgroundImage
  318.      *
  319.      * @param string $backgroundImage
  320.      *
  321.      * @return Module
  322.      */
  323.     public function setBackgroundImage($backgroundImage)
  324.     {
  325.         $this->backgroundImage $backgroundImage;
  326.         return $this;
  327.     }
  328.     /**
  329.      * Get backgroundImage
  330.      *
  331.      * @return string
  332.      */
  333.     public function getBackgroundImage()
  334.     {
  335.         return $this->backgroundImage;
  336.     }
  337.     /**
  338.      * Set moduleDescription
  339.      *
  340.      * @param string $moduleDescription
  341.      *
  342.      * @return Module
  343.      */
  344.     public function setModuleDescription($moduleDescription)
  345.     {
  346.         $this->moduleDescription $moduleDescription;
  347.         return $this;
  348.     }
  349.     /**
  350.      * Get moduleDescription
  351.      *
  352.      * @return string
  353.      */
  354.     public function getModuleDescription()
  355.     {
  356.         return $this->moduleDescription;
  357.     }
  358. }