partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

StatisticSnapshotUnit.php (2442B)


      1 <?php
      2 
      3 namespace PartKeepr\StatisticBundle\Entity;
      4 
      5 use Doctrine\ORM\Mapping as Mapping;
      6 use PartKeepr\PartBundle\Entity\PartMeasurementUnit;
      7 
      8 /**
      9  * @Mapping\Entity
     10  */
     11 class StatisticSnapshotUnit
     12 {
     13     /**
     14      * @Mapping\Id
     15      * @Mapping\Column(type="integer")
     16      * @Mapping\GeneratedValue(strategy="AUTO")
     17      *
     18      * @var int
     19      */
     20     private $id;
     21 
     22     /**
     23      * @Mapping\ManyToOne(targetEntity="PartKeepr\StatisticBundle\Entity\StatisticSnapshot")
     24      * The statistic snapshot this entity belongs to
     25      *
     26      * @var StatisticSnapshot
     27      */
     28     private $statisticSnapshot;
     29 
     30     /**
     31      * @Mapping\ManyToOne(targetEntity="PartKeepr\PartBundle\Entity\PartMeasurementUnit")
     32      * The statistic snapshot this entity belongs to
     33      *
     34      * @var StatisticSnapshot
     35      */
     36     private $partUnit;
     37 
     38     /**
     39      * The stockLevel for the unit.
     40      *
     41      * @Mapping\Column(type="integer")
     42      *
     43      * @var int
     44      */
     45     private $stockLevel;
     46 
     47     /**
     48      * Sets the statistic snapshot this entity belongs to.
     49      *
     50      * @param StatisticSnapshot $snapshot The snapshot
     51      */
     52     public function setStatisticSnapshot(StatisticSnapshot $snapshot)
     53     {
     54         $this->statisticSnapshot = $snapshot;
     55     }
     56 
     57     /**
     58      * Returns the snapshot this entity belongs to.
     59      *
     60      * @return StatisticSnapshot The snapshot
     61      */
     62     public function getStatisticSnapshot()
     63     {
     64         return $this->statisticSnapshot;
     65     }
     66 
     67     /**
     68      * Sets the part unit for this entity.
     69      *
     70      * @param PartMeasurementUnit $unit The part unit
     71      */
     72     public function setPartUnit(PartMeasurementUnit $unit)
     73     {
     74         $this->partUnit = $unit;
     75     }
     76 
     77     /**
     78      * Returns the part unit for this entity.
     79      *
     80      * @return PartMeasurementUnit The part unit
     81      */
     82     public function getPartUnit()
     83     {
     84         return $this->partUnit;
     85     }
     86 
     87     /**
     88      * Returns the ID of this statistic snapshot unit.
     89      *
     90      * @return int The ID
     91      */
     92     public function getId()
     93     {
     94         return $this->id;
     95     }
     96 
     97     /**
     98      * Sets the stock level for this unit snapshot.
     99      *
    100      * @param int $stockLevel
    101      */
    102     public function setStockLevel($stockLevel)
    103     {
    104         $this->stockLevel = $stockLevel;
    105     }
    106 
    107     /**
    108      * Returns the stock level for this unit snapshot.
    109      *
    110      * @return int The stock level
    111      */
    112     public function getStockLevel()
    113     {
    114         return $this->stockLevel;
    115     }
    116 }