src/AtechNet/CoreBundle/Entity/CustomerData.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\AtechNet\CoreBundle\Entity;
  3. use App\AtechNet\CoreBundle\Repository\CustomerDataRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Doctrine\ORM\Mapping\Column;
  6. use Doctrine\ORM\Mapping\Entity;
  7. use Doctrine\ORM\Mapping\JoinColumn;
  8. use Doctrine\ORM\Mapping\ManyToOne;
  9. use Doctrine\ORM\Mapping\Table as Table;
  10. /**
  11.  * CustomerData
  12.  *
  13.  * @Table(name="customers__data")
  14.  * @Entity(repositoryClass=CustomerDataRepository::class)
  15.  */
  16. class CustomerData extends AbstractEntity
  17. {
  18.     /**
  19.      * @var Domain
  20.      *
  21.      * @ManyToOne(targetEntity="Customer", inversedBy="datas")
  22.      * @JoinColumn(name="customer_id", referencedColumnName="id")
  23.      */
  24.     private $customer;
  25.     public const SellingIn_Shop = 1;
  26.     public const SellingIn_Eshop = 2;
  27.     public const SellingIn_ShopAndEshop = 3;
  28.     public const SellingIn_NoShop = 4;
  29.     public static function getSellingInChoices()
  30.     {
  31.         return [
  32.             self::SellingIn_Shop => 'Traditional shop',
  33.             self::SellingIn_Eshop => 'E-shop',
  34.             self::SellingIn_ShopAndEshop => 'Traditional and E-shop',
  35.             self::SellingIn_NoShop => 'Not selling in shops',
  36.         ];
  37.     }
  38.     /**
  39.      * @var integer
  40.      *
  41.      * @ORM\Column(name="selling_in", type="integer", nullable=true)
  42.      */
  43.     private $sellingIn;
  44.     public const ShopCount_1 = 1;
  45.     public const ShopCount_2 = 2;
  46.     public const ShopCount_3 = 3;
  47.     public const ShopCount_4 = 4;
  48.     public const ShopCount_5 = 5;
  49.     public const ShopCount_6 = 6;
  50.     public static function getShopCountChoices()
  51.     {
  52.         return [
  53.             self::ShopCount_1 => '1',
  54.             self::ShopCount_2 => '2',
  55.             self::ShopCount_3 => '3',
  56.             self::ShopCount_4 => '4',
  57.             self::ShopCount_5 => '5',
  58.             self::ShopCount_6 => '6 or more',
  59.         ];
  60.     }
  61.     /**
  62.      * @var integer
  63.      *
  64.      * @Column(name="shop_count", type="integer", nullable=true)
  65.      */
  66.     private $shopCount;
  67.     public const ShopSize_1 = 1;
  68.     public const ShopSize_2 = 2;
  69.     public const ShopSize_3 = 3;
  70.     public const ShopSize_4 = 4;
  71.     public static function getShopSizeChoices()
  72.     {
  73.         return [
  74.             self::ShopSize_1 => '0-20 m2',
  75.             self::ShopSize_2 => '21-50 m2',
  76.             self::ShopSize_3 => '51-100 m2',
  77.             self::ShopSize_4 => '100+ m2',
  78.         ];
  79.     }
  80.     /**
  81.      * @var integer
  82.      *
  83.      * @Column(name="shop_size", type="integer", nullable=true)
  84.      */
  85.     private $shopSize;
  86.     public const EmployeeCount_1 = 1;
  87.     public const EmployeeCount_2 = 2;
  88.     public const EmployeeCount_3 = 3;
  89.     public const EmployeeCount_4 = 4;
  90.     public static function getEmployeeCountChoices()
  91.     {
  92.         return [
  93.             self::ShopSize_1 => '1-3',
  94.             self::ShopSize_2 => '4-6',
  95.             self::ShopSize_3 => '7-10',
  96.             self::ShopSize_4 => 'More than 10',
  97.         ];
  98.     }
  99.     /**
  100.      * @var integer
  101.      *
  102.      * @Column(name="employee_count", type="integer", nullable=true)
  103.      */
  104.     private $employeeCount;
  105.     public const Experience_1 = 1;
  106.     public const Experience_2 = 2;
  107.     public const Experience_3 = 3;
  108.     public const Experience_4 = 4;
  109.     public const Experience_5 = 5;
  110.     public const Experience_6 = 6;
  111.     public static function getExperienceChoices()
  112.     {
  113.         return [
  114.             self::Experience_1 => 'less than 1 year',
  115.             self::Experience_2 => '1-2 years',
  116.             self::Experience_3 => '3-4 years',
  117.             self::Experience_4 => '5-6 years',
  118.             self::Experience_5 => '7-10 years',
  119.             self::Experience_6 => 'more than 10 years',
  120.         ];
  121.     }
  122.     /**
  123.      * @var integer
  124.      *
  125.      * @Column(name="experience", type="integer", nullable=true)
  126.      */
  127.     private $experience;
  128.     public const MarketPosition_1 = 1;
  129.     public const MarketPosition_2 = 2;
  130.     public const MarketPosition_3 = 3;
  131.     public const MarketPosition_4 = 4;
  132.     public const MarketPosition_5 = 5;
  133.     public const MarketPosition_6 = 6;
  134.     public const MarketPosition_7 = 7;
  135.     public const MarketPosition_8 = 8;
  136.     public static function getMarketPositionChoices()
  137.     {
  138.         return [
  139.             self::MarketPosition_1 => '1',
  140.             self::MarketPosition_2 => '2',
  141.             self::MarketPosition_3 => '3',
  142.             self::MarketPosition_4 => '4',
  143.             self::MarketPosition_5 => '5',
  144.             self::MarketPosition_6 => '6-10',
  145.             self::MarketPosition_7 => '11-20',
  146.             self::MarketPosition_8 => 'Lower than 20th',
  147.         ];
  148.     }
  149.     /**
  150.      * @var integer
  151.      *
  152.      * @Column(name="market_position", type="integer", nullable=true)
  153.      */
  154.     private $marketPosition;
  155.     public const MarketPositionOutOf_1 = 1;
  156.     public const MarketPositionOutOf_2 = 2;
  157.     public const MarketPositionOutOf_3 = 3;
  158.     public const MarketPositionOutOf_4 = 4;
  159.     public const MarketPositionOutOf_5 = 5;
  160.     public const MarketPositionOutOf_6 = 6;
  161.     public const MarketPositionOutOf_7 = 7;
  162.     public const MarketPositionOutOf_8 = 8;
  163.     public const MarketPositionOutOf_9 = 9;
  164.     public const MarketPositionOutOf_10 = 10;
  165.     public const MarketPositionOutOf_11 = 11;
  166.     public const MarketPositionOutOf_12 = 12;
  167.     public const MarketPositionOutOf_13 = 13;
  168.     public const MarketPositionOutOf_14 = 14;
  169.     public static function getMarketPositionOutOfChoices()
  170.     {
  171.         return [
  172.             self::MarketPositionOutOf_1 => '1',
  173.             self::MarketPositionOutOf_2 => '2',
  174.             self::MarketPositionOutOf_3 => '3',
  175.             self::MarketPositionOutOf_4 => '4',
  176.             self::MarketPositionOutOf_5 => '5',
  177.             self::MarketPositionOutOf_6 => '6',
  178.             self::MarketPositionOutOf_7 => '7',
  179.             self::MarketPositionOutOf_8 => '8',
  180.             self::MarketPositionOutOf_9 => '9',
  181.             self::MarketPositionOutOf_10 => '10',
  182.             self::MarketPositionOutOf_11 => '11-15',
  183.             self::MarketPositionOutOf_12 => '16-20',
  184.             self::MarketPositionOutOf_13 => '21-30',
  185.             self::MarketPositionOutOf_14 => 'More than 30',
  186.         ];
  187.     }
  188.     /**
  189.      * @var integer
  190.      *
  191.      * @ORM\Column(name="market_position_out_of", type="integer", nullable=true)
  192.      */
  193.     private $marketPositionOutOf;
  194.     public const PcSalesShare_0 = 0;
  195.     public const PcSalesShare_1 = 1;
  196.     public const PcSalesShare_2 = 2;
  197.     public const PcSalesShare_3 = 3;
  198.     public const PcSalesShare_4 = 4;
  199.     public const PcSalesShare_5 = 5;
  200.     public const PcSalesShare_6 = 6;
  201.     public const PcSalesShare_7 = 7;
  202.     public const PcSalesShare_8 = 8;
  203.     public const PcSalesShare_9 = 9;
  204.     public const PcSalesShare_10 = 10;
  205.     public static function getPcSalesShareChoices()
  206.     {
  207.         return [
  208.             self::PcSalesShare_0 => '0%',
  209.             self::PcSalesShare_1 => '10%',
  210.             self::PcSalesShare_2 => '20%',
  211.             self::PcSalesShare_3 => '30%',
  212.             self::PcSalesShare_4 => '40%',
  213.             self::PcSalesShare_5 => '50%',
  214.             self::PcSalesShare_6 => '60%',
  215.             self::PcSalesShare_7 => '70%',
  216.             self::PcSalesShare_8 => '80%',
  217.             self::PcSalesShare_9 => '90%',
  218.             self::PcSalesShare_10 => '100%',
  219.         ];
  220.     }
  221.     /**
  222.      * @var integer
  223.      *
  224.      * @Column(name="pc_sales_share", type="integer", nullable=true)
  225.      */
  226.     private $pcSalesShare;
  227.     public const PcSoldPerMonth_1 = 1;
  228.     public const PcSoldPerMonth_2 = 2;
  229.     public const PcSoldPerMonth_3 = 3;
  230.     public const PcSoldPerMonth_4 = 4;
  231.     public const PcSoldPerMonth_5 = 5;
  232.     public static function getPcSoldPerMonthChoices()
  233.     {
  234.         return [
  235.             self::PcSoldPerMonth_1 => '0-5',
  236.             self::PcSoldPerMonth_2 => '6-15',
  237.             self::PcSoldPerMonth_3 => '16-25',
  238.             self::PcSoldPerMonth_4 => '26-40',
  239.             self::PcSoldPerMonth_5 => 'More than 40',
  240.         ];
  241.     }
  242.     /**
  243.      * @var integer
  244.      *
  245.      * @Column(name="pc_sold_per_month", type="integer", nullable=true)
  246.      */
  247.     private $pcSoldPerMonth;
  248.     public const AdBudget_0 = 0;
  249.     public const AdBudget_1 = 1;
  250.     public const AdBudget_2 = 2;
  251.     public const AdBudget_3 = 3;
  252.     public const AdBudget_4 = 4;
  253.     public const AdBudget_5 = 5;
  254.     public static function getAdBudgetChoices()
  255.     {
  256.         return [
  257.             self::AdBudget_0 => '0',
  258.             self::AdBudget_1 => '1-50 EUR',
  259.             self::AdBudget_2 => '51-150 EUR',
  260.             self::AdBudget_3 => '151-250 EUR',
  261.             self::AdBudget_4 => '251-400 EUR',
  262.             self::AdBudget_5 => '401 EUR and more',
  263.         ];
  264.     }
  265.     /**
  266.      * @var integer
  267.      *
  268.      * @Column(name="ad_budget", type="integer", nullable=true)
  269.      */
  270.     private $adBudget;
  271.     public const MonthlyTurnover_1 = 1;
  272.     public const MonthlyTurnover_2 = 2;
  273.     public const MonthlyTurnover_3 = 3;
  274.     public const MonthlyTurnover_4 = 4;
  275.     public const MonthlyTurnover_5 = 5;
  276.     public static function getMonthlyTurnoverChoices()
  277.     {
  278.         return [
  279.             self::MonthlyTurnover_1 => '0-5000 EUR',
  280.             self::MonthlyTurnover_2 => '5001-15000 EUR',
  281.             self::MonthlyTurnover_3 => '15001-30000 EUR',
  282.             self::MonthlyTurnover_4 => 'More than 3000 EUR',
  283.             self::MonthlyTurnover_5 => 'Secret',
  284.         ];
  285.     }
  286.     /**
  287.      * @var integer
  288.      *
  289.      * @Column(name="monthly_turnover", type="integer", nullable=true)
  290.      */
  291.     private $monthlyTurnover;
  292.     public const Relationship_1 = 1;
  293.     public const Relationship_2 = 2;
  294.     public const Relationship_3 = 3;
  295.     public const Relationship_4 = 4;
  296.     public const Relationship_5 = 5;
  297.     public const Relationship_6 = 6;
  298.     public static function getRelationshipChoices()
  299.     {
  300.         return [
  301.             self::Relationship_1 => 'Not contacted',
  302.             self::Relationship_2 => 'Contacted',
  303.             self::Relationship_3 => 'In progress',
  304.             self::Relationship_4 => 'In case of demand orders',
  305.             self::Relationship_5 => 'Orders frequently',
  306.             self::Relationship_6 => 'Not interested',
  307.         ];
  308.     }
  309.     /**
  310.      * @var integer
  311.      *
  312.      * @Column(name="relationship", type="integer", nullable=true)
  313.      */
  314.     private $relationship;
  315.     public const Status_NewRegistration = 1;
  316.     public const Status_NotOrdered = 2;
  317.     public const Status_NoCooperation = 3;
  318.     public const Status_OldBuyer = 4;
  319.     public const Status_SmallPartner = 5;
  320.     public const Status_MediumPartner = 6;
  321.     public const Status_BigPartner = 7;
  322.     public static function getStatusChoices()
  323.     {
  324.         return [
  325.             self::Status_NewRegistration => 'New registration',
  326.             self::Status_NotOrdered => 'Not ordered',
  327.             self::Status_NoCooperation => 'No cooperation',
  328.             self::Status_OldBuyer => 'Old buyer',
  329.             self::Status_SmallPartner => 'Small partner',
  330.             self::Status_MediumPartner => 'Medium partner',
  331.             self::Status_BigPartner => 'Big partner',
  332.         ];
  333.     }
  334.     /**
  335.      * @var integer
  336.      *
  337.      * @Column(name="status", type="integer", nullable=true)
  338.      */
  339.     private $status;
  340.     /**
  341.      * @return Customer
  342.      */
  343.     public function getCustomer()
  344.     {
  345.         return $this->customer;
  346.     }
  347.     /**
  348.      * @param Customer $customer
  349.      */
  350.     public function setCustomer($customer)
  351.     {
  352.         $this->customer = $customer;
  353.     }
  354.     /**
  355.      * Set sellingIn
  356.      *
  357.      * @param integer $sellingIn
  358.      * @return CustomerData
  359.      */
  360.     public function setSellingIn($sellingIn)
  361.     {
  362.         $this->sellingIn = $sellingIn;
  363.         return $this;
  364.     }
  365.     /**
  366.      * Get sellingIn
  367.      *
  368.      * @return integer
  369.      */
  370.     public function getSellingIn()
  371.     {
  372.         return $this->sellingIn;
  373.     }
  374.     /**
  375.      * Set shopCount
  376.      *
  377.      * @param integer $shopCount
  378.      * @return CustomerData
  379.      */
  380.     public function setShopCount($shopCount)
  381.     {
  382.         $this->shopCount = $shopCount;
  383.         return $this;
  384.     }
  385.     /**
  386.      * Get shopCount
  387.      *
  388.      * @return integer
  389.      */
  390.     public function getShopCount()
  391.     {
  392.         return $this->shopCount;
  393.     }
  394.     /**
  395.      * Set shopSize
  396.      *
  397.      * @param integer $shopSize
  398.      * @return CustomerData
  399.      */
  400.     public function setShopSize($shopSize)
  401.     {
  402.         $this->shopSize = $shopSize;
  403.         return $this;
  404.     }
  405.     /**
  406.      * Get shopSize
  407.      *
  408.      * @return integer
  409.      */
  410.     public function getShopSize()
  411.     {
  412.         return $this->shopSize;
  413.     }
  414.     /**
  415.      * Set employeeCount
  416.      *
  417.      * @param integer $employeeCount
  418.      * @return CustomerData
  419.      */
  420.     public function setEmployeeCount($employeeCount)
  421.     {
  422.         $this->employeeCount = $employeeCount;
  423.         return $this;
  424.     }
  425.     /**
  426.      * Get employeeCount
  427.      *
  428.      * @return integer
  429.      */
  430.     public function getEmployeeCount()
  431.     {
  432.         return $this->employeeCount;
  433.     }
  434.     /**
  435.      * @return int
  436.      */
  437.     public function getExperience()
  438.     {
  439.         return $this->experience;
  440.     }
  441.     /**
  442.      * @param int $experience
  443.      */
  444.     public function setExperience($experience)
  445.     {
  446.         $this->experience = $experience;
  447.     }
  448.     /**
  449.      * Set marketPosition
  450.      *
  451.      * @param integer $marketPosition
  452.      * @return CustomerData
  453.      */
  454.     public function setMarketPosition($marketPosition)
  455.     {
  456.         $this->marketPosition = $marketPosition;
  457.         return $this;
  458.     }
  459.     /**
  460.      * Get marketPosition
  461.      *
  462.      * @return integer
  463.      */
  464.     public function getMarketPosition()
  465.     {
  466.         return $this->marketPosition;
  467.     }
  468.     /**
  469.      * Set marketPositionOutOf
  470.      *
  471.      * @param integer $marketPositionOutOf
  472.      * @return CustomerData
  473.      */
  474.     public function setMarketPositionOutOf($marketPositionOutOf)
  475.     {
  476.         $this->marketPositionOutOf = $marketPositionOutOf;
  477.         return $this;
  478.     }
  479.     /**
  480.      * Get marketPositionOutOf
  481.      *
  482.      * @return integer
  483.      */
  484.     public function getMarketPositionOutOf()
  485.     {
  486.         return $this->marketPositionOutOf;
  487.     }
  488.     /**
  489.      * Set pcSalesShare
  490.      *
  491.      * @param integer $pcSalesShare
  492.      * @return CustomerData
  493.      */
  494.     public function setPcSalesShare($pcSalesShare)
  495.     {
  496.         $this->pcSalesShare = $pcSalesShare;
  497.         return $this;
  498.     }
  499.     /**
  500.      * Get pcSalesShare
  501.      *
  502.      * @return integer
  503.      */
  504.     public function getPcSalesShare()
  505.     {
  506.         return $this->pcSalesShare;
  507.     }
  508.     /**
  509.      * Set pcSoldPerMonth
  510.      *
  511.      * @param integer $pcSoldPerMonth
  512.      * @return CustomerData
  513.      */
  514.     public function setPcSoldPerMonth($pcSoldPerMonth)
  515.     {
  516.         $this->pcSoldPerMonth = $pcSoldPerMonth;
  517.         return $this;
  518.     }
  519.     /**
  520.      * Get pcSoldPerMonth
  521.      *
  522.      * @return integer
  523.      */
  524.     public function getPcSoldPerMonth()
  525.     {
  526.         return $this->pcSoldPerMonth;
  527.     }
  528.     /**
  529.      * Set adBudget
  530.      *
  531.      * @param integer $adBudget
  532.      * @return CustomerData
  533.      */
  534.     public function setAdBudget($adBudget)
  535.     {
  536.         $this->adBudget = $adBudget;
  537.         return $this;
  538.     }
  539.     /**
  540.      * Get adBudget
  541.      *
  542.      * @return integer
  543.      */
  544.     public function getAdBudget()
  545.     {
  546.         return $this->adBudget;
  547.     }
  548.     /**
  549.      * Set monthlyTurnover
  550.      *
  551.      * @param integer $monthlyTurnover
  552.      * @return CustomerData
  553.      */
  554.     public function setMonthlyTurnover($monthlyTurnover)
  555.     {
  556.         $this->monthlyTurnover = $monthlyTurnover;
  557.         return $this;
  558.     }
  559.     /**
  560.      * Get monthlyTurnover
  561.      *
  562.      * @return integer
  563.      */
  564.     public function getMonthlyTurnover()
  565.     {
  566.         return $this->monthlyTurnover;
  567.     }
  568.     /**
  569.      * Set status
  570.      *
  571.      * @param integer $status
  572.      * @return CustomerData
  573.      */
  574.     public function setStatus($status)
  575.     {
  576.         $this->status = $status;
  577.         return $this;
  578.     }
  579.     /**
  580.      * Get status
  581.      *
  582.      * @return integer
  583.      */
  584.     public function getStatus()
  585.     {
  586.         return $this->status;
  587.     }
  588.     /**
  589.      * @return int
  590.      */
  591.     public function getRelationship()
  592.     {
  593.         return $this->relationship;
  594.     }
  595.     /**
  596.      * @param int $relationship
  597.      */
  598.     public function setRelationship($relationship)
  599.     {
  600.         $this->relationship = $relationship;
  601.     }
  602.     /**
  603.      * Returns title of status set for entity or NULL if not set
  604.      */
  605.     public function getStatusTitle()
  606.     {
  607.         if ($this->status != 0) {
  608.             return self::getStatusChoices()[$this->status];
  609.         } else {
  610.             return null;
  611.         }
  612.     }
  613. }