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

Open in your IDE?
  1. <?php
  2. namespace App\AtechNet\CoreBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping\Column;
  5. use Doctrine\ORM\Mapping\Entity;
  6. use Doctrine\ORM\Mapping\ManyToMany;
  7. use Doctrine\ORM\Mapping\OneToMany;
  8. use Doctrine\ORM\Mapping\OrderBy;
  9. use Doctrine\ORM\Mapping\Table as Table;
  10. /**
  11.  * AikenShipment
  12.  *
  13.  * @Table(name="aiken_shipments")
  14.  * @Entity
  15.  */
  16. class AikenShipment extends AbstractSignedEntity
  17. {
  18.     public const int NONE = 1;
  19.     public const int PC = 2;
  20.     public const int NOTEBOOK = 3;
  21.     public const int MONITOR = 4;
  22.     public const int SOURCE_NONE = 0;
  23.     public const int SOURCE_IWS = 1;
  24.     public const int SOURCE_AIKEN = 2;
  25.     public const int SOURCE_BLANCCO = 3;
  26.     public const int COMPONENT_STATE_NOT_PRESENT = 0;
  27.     public const int COMPONENT_STATE_NOT_TESTED = 1;
  28.     public const int COMPONENT_STATE_WORKING = 2;
  29.     public const int COMPONENT_STATE_NOT_WORKING = 3;
  30.     public const int COMPONENT_STATE_LOW_CAPACITY = 4;
  31.     public const int COMPONENT_STATE_DAMAGED = 5;
  32.     public const int COMPONENT_STATE_MISSING_BUTTONS = 6;
  33.     public const int COMPONENT_STATE_DEFECTED_BUTTONS = 7;
  34.     public const int COMPONENT_STATE_OK = 8;
  35.     public const int COMPONENT_STATE_MISSING = 9;
  36.     public const int COMPONENT_STATE_FAIL = 10;
  37.     public const int COMPONENT_STATE_YES = 11;
  38.     public const int COMPONENT_STATE_NO = 12;
  39.     public const int COMPONENT_STATE_BLACK = 13;
  40.     public const int COMPONENT_STATE_WHITE = 14;
  41.     public const int COMPONENT_STATE_LOOSE_HINGES = 15;
  42.     public const int COMPONENT_STATE_INTACT = 16;
  43.     public const int COMPONENT_STATE_NOISY = 17;
  44.     public const int COMPONENT_STATE_LOCKED = 18;
  45.     public const int COMPONENT_STATE_CMOS_BATTERY_LOW = 19;
  46.     /**
  47.      * @var ArrayCollection
  48.      *
  49.      * @ManyToMany(targetEntity="StockMovementItem", mappedBy="aikenShipments")
  50.      * @OrderBy({"created" = "DESC"})
  51.      */
  52.     private $movementItems;
  53.     /**
  54.      * @var int
  55.      *
  56.      * @Column(name="category", type="integer")
  57.      */
  58.     private $category;
  59.     /**
  60.      * @var int
  61.      *
  62.      * @Column(name="products", type="integer")
  63.      */
  64.     private $products;
  65.     /**
  66.      * @var ArrayCollection
  67.      *
  68.      * @OneToMany(targetEntity="AikenShipmentItem", mappedBy="aikenShipment", orphanRemoval=true)
  69.      * @OrderBy({"created" = "DESC"})
  70.      **/
  71.     private $aikenShipmentItems;
  72.     /**
  73.      * @var int
  74.      *
  75.      * @Column(name="source", type="integer")
  76.      */
  77.     private $source = 1;
  78.     /**
  79.      * @return array
  80.      */
  81.     public static function getSourceTypes(): array
  82.     {
  83.         return [
  84.             self::SOURCE_NONE    => 'None',
  85.             self::SOURCE_IWS     => 'IWS',
  86.             self::SOURCE_AIKEN   => 'Aiken',
  87.             self::SOURCE_BLANCCO => 'Blancco',
  88.         ];
  89.     }
  90.     /**
  91.      * @return array
  92.      */
  93.     public static function getComponentStateTypes(): array
  94.     {
  95.         return [
  96.             self::COMPONENT_STATE_NOT_PRESENT      => 'Not Present',
  97.             self::COMPONENT_STATE_NOT_TESTED       => 'Not Tested',
  98.             self::COMPONENT_STATE_WORKING          => 'Working',
  99.             self::COMPONENT_STATE_NOT_WORKING      => 'Not Working',
  100.             self::COMPONENT_STATE_LOW_CAPACITY     => 'Low Capacity',
  101.             self::COMPONENT_STATE_DAMAGED          => 'Damaged',
  102.             self::COMPONENT_STATE_MISSING_BUTTONS  => 'Missing Buttons',
  103.             self::COMPONENT_STATE_DEFECTED_BUTTONS => 'Defected Buttons',
  104.             self::COMPONENT_STATE_OK               => 'OK',
  105.             self::COMPONENT_STATE_MISSING          => 'Missing',
  106.             self::COMPONENT_STATE_FAIL             => 'Fail',
  107.             self::COMPONENT_STATE_YES              => 'Yes',
  108.             self::COMPONENT_STATE_NO               => 'No',
  109.             self::COMPONENT_STATE_BLACK            => 'Black',
  110.             self::COMPONENT_STATE_WHITE            => 'White',
  111.             self::COMPONENT_STATE_LOOSE_HINGES     => 'Loose hinges',
  112.             self::COMPONENT_STATE_INTACT           => 'Intact',
  113.             self::COMPONENT_STATE_NOISY            => 'Noisy',
  114.             self::COMPONENT_STATE_LOCKED           => 'Locked',
  115.             self::COMPONENT_STATE_CMOS_BATTERY_LOW => 'CMOS Battery Low',
  116.         ];
  117.     }
  118.     public static function getCategoryChoices(): array
  119.     {
  120.         return [
  121.             self::NONE     => 'None',
  122.             self::PC       => 'PC',
  123.             self::NOTEBOOK => 'Notebook',
  124.             self::MONITOR  => 'Monitor',
  125.         ];
  126.     }
  127.     /**
  128.      * @return ArrayCollection
  129.      */
  130.     public function getMovementItems()
  131.     {
  132.         return $this->movementItems;
  133.     }
  134.     /**
  135.      * @param ArrayCollection $movementItems
  136.      */
  137.     public function setMovementItems($movementItems)
  138.     {
  139.         $this->movementItems = $movementItems;
  140.     }
  141.     /**
  142.      * Get category
  143.      *
  144.      * @return string
  145.      */
  146.     public function getCategory()
  147.     {
  148.         return $this->category;
  149.     }
  150.     /**
  151.      * Set category
  152.      *
  153.      * @param string $category
  154.      * @return AikenShipment
  155.      */
  156.     public function setCategory($category)
  157.     {
  158.         $this->category = $category;
  159.         return $this;
  160.     }
  161.     /**
  162.      * Get products
  163.      *
  164.      * @return string
  165.      */
  166.     public function getProducts()
  167.     {
  168.         return $this->products;
  169.     }
  170.     /**
  171.      * Set products
  172.      *
  173.      * @param string $products
  174.      * @return AikenShipment
  175.      */
  176.     public function setProducts($products)
  177.     {
  178.         $this->products = $products;
  179.         return $this;
  180.     }
  181.     /**
  182.      * @return ArrayCollection
  183.      */
  184.     public function getAikenShipmentItems()
  185.     {
  186.         return $this->aikenShipmentItems;
  187.     }
  188.     /**
  189.      * @return int
  190.      */
  191.     public function getSource()
  192.     {
  193.         return $this->source;
  194.     }
  195.     /**
  196.      * @param int $source
  197.      */
  198.     public function setSource($source)
  199.     {
  200.         $this->source = $source;
  201.     }
  202. }