<?php
namespace App\AtechNet\CoreBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\ManyToMany;
use Doctrine\ORM\Mapping\OneToMany;
use Doctrine\ORM\Mapping\OrderBy;
use Doctrine\ORM\Mapping\Table as Table;
/**
* AikenShipment
*
* @Table(name="aiken_shipments")
* @Entity
*/
class AikenShipment extends AbstractSignedEntity
{
public const int NONE = 1;
public const int PC = 2;
public const int NOTEBOOK = 3;
public const int MONITOR = 4;
public const int SOURCE_NONE = 0;
public const int SOURCE_IWS = 1;
public const int SOURCE_AIKEN = 2;
public const int SOURCE_BLANCCO = 3;
public const int COMPONENT_STATE_NOT_PRESENT = 0;
public const int COMPONENT_STATE_NOT_TESTED = 1;
public const int COMPONENT_STATE_WORKING = 2;
public const int COMPONENT_STATE_NOT_WORKING = 3;
public const int COMPONENT_STATE_LOW_CAPACITY = 4;
public const int COMPONENT_STATE_DAMAGED = 5;
public const int COMPONENT_STATE_MISSING_BUTTONS = 6;
public const int COMPONENT_STATE_DEFECTED_BUTTONS = 7;
public const int COMPONENT_STATE_OK = 8;
public const int COMPONENT_STATE_MISSING = 9;
public const int COMPONENT_STATE_FAIL = 10;
public const int COMPONENT_STATE_YES = 11;
public const int COMPONENT_STATE_NO = 12;
public const int COMPONENT_STATE_BLACK = 13;
public const int COMPONENT_STATE_WHITE = 14;
public const int COMPONENT_STATE_LOOSE_HINGES = 15;
public const int COMPONENT_STATE_INTACT = 16;
public const int COMPONENT_STATE_NOISY = 17;
public const int COMPONENT_STATE_LOCKED = 18;
public const int COMPONENT_STATE_CMOS_BATTERY_LOW = 19;
/**
* @var ArrayCollection
*
* @ManyToMany(targetEntity="StockMovementItem", mappedBy="aikenShipments")
* @OrderBy({"created" = "DESC"})
*/
private $movementItems;
/**
* @var int
*
* @Column(name="category", type="integer")
*/
private $category;
/**
* @var int
*
* @Column(name="products", type="integer")
*/
private $products;
/**
* @var ArrayCollection
*
* @OneToMany(targetEntity="AikenShipmentItem", mappedBy="aikenShipment", orphanRemoval=true)
* @OrderBy({"created" = "DESC"})
**/
private $aikenShipmentItems;
/**
* @var int
*
* @Column(name="source", type="integer")
*/
private $source = 1;
/**
* @return array
*/
public static function getSourceTypes(): array
{
return [
self::SOURCE_NONE => 'None',
self::SOURCE_IWS => 'IWS',
self::SOURCE_AIKEN => 'Aiken',
self::SOURCE_BLANCCO => 'Blancco',
];
}
/**
* @return array
*/
public static function getComponentStateTypes(): array
{
return [
self::COMPONENT_STATE_NOT_PRESENT => 'Not Present',
self::COMPONENT_STATE_NOT_TESTED => 'Not Tested',
self::COMPONENT_STATE_WORKING => 'Working',
self::COMPONENT_STATE_NOT_WORKING => 'Not Working',
self::COMPONENT_STATE_LOW_CAPACITY => 'Low Capacity',
self::COMPONENT_STATE_DAMAGED => 'Damaged',
self::COMPONENT_STATE_MISSING_BUTTONS => 'Missing Buttons',
self::COMPONENT_STATE_DEFECTED_BUTTONS => 'Defected Buttons',
self::COMPONENT_STATE_OK => 'OK',
self::COMPONENT_STATE_MISSING => 'Missing',
self::COMPONENT_STATE_FAIL => 'Fail',
self::COMPONENT_STATE_YES => 'Yes',
self::COMPONENT_STATE_NO => 'No',
self::COMPONENT_STATE_BLACK => 'Black',
self::COMPONENT_STATE_WHITE => 'White',
self::COMPONENT_STATE_LOOSE_HINGES => 'Loose hinges',
self::COMPONENT_STATE_INTACT => 'Intact',
self::COMPONENT_STATE_NOISY => 'Noisy',
self::COMPONENT_STATE_LOCKED => 'Locked',
self::COMPONENT_STATE_CMOS_BATTERY_LOW => 'CMOS Battery Low',
];
}
public static function getCategoryChoices(): array
{
return [
self::NONE => 'None',
self::PC => 'PC',
self::NOTEBOOK => 'Notebook',
self::MONITOR => 'Monitor',
];
}
/**
* @return ArrayCollection
*/
public function getMovementItems()
{
return $this->movementItems;
}
/**
* @param ArrayCollection $movementItems
*/
public function setMovementItems($movementItems)
{
$this->movementItems = $movementItems;
}
/**
* Get category
*
* @return string
*/
public function getCategory()
{
return $this->category;
}
/**
* Set category
*
* @param string $category
* @return AikenShipment
*/
public function setCategory($category)
{
$this->category = $category;
return $this;
}
/**
* Get products
*
* @return string
*/
public function getProducts()
{
return $this->products;
}
/**
* Set products
*
* @param string $products
* @return AikenShipment
*/
public function setProducts($products)
{
$this->products = $products;
return $this;
}
/**
* @return ArrayCollection
*/
public function getAikenShipmentItems()
{
return $this->aikenShipmentItems;
}
/**
* @return int
*/
public function getSource()
{
return $this->source;
}
/**
* @param int $source
*/
public function setSource($source)
{
$this->source = $source;
}
}