Add current rating field for Rider entity #10
This commit is contained in:
parent
dfffcc43cb
commit
3df1470559
1 changed files with 21 additions and 0 deletions
|
|
@ -46,25 +46,35 @@ class Rider
|
|||
*/
|
||||
protected $plate_number;
|
||||
|
||||
// hub that the rider is assigned to
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Hub", inversedBy="riders")
|
||||
* @ORM\JoinColumn(name="hub_id", referencedColumnName="id")
|
||||
*/
|
||||
protected $hub;
|
||||
|
||||
// job orders that the rider has done
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="JobOrder", mappedBy="rider")
|
||||
*/
|
||||
protected $job_orders;
|
||||
|
||||
// picture of rider
|
||||
/**
|
||||
* @ORM\Column(type="string", nullable=true)
|
||||
*/
|
||||
protected $image_file;
|
||||
|
||||
// current rating of rider
|
||||
/**
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
protected $curr_rating;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->job_orders = new ArrayCollection();
|
||||
$this->curr_rating = 0;
|
||||
}
|
||||
|
||||
public function getID()
|
||||
|
|
@ -148,4 +158,15 @@ class Rider
|
|||
{
|
||||
return $this->image_file;
|
||||
}
|
||||
|
||||
public function setCurrentRating($rating)
|
||||
{
|
||||
$this->curr_rating = $rating;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCurrentRating()
|
||||
{
|
||||
return $this->curr_rating;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue