Add flag_active to battery model. #732
This commit is contained in:
parent
935dc15101
commit
f5c351b179
1 changed files with 19 additions and 0 deletions
|
|
@ -33,9 +33,17 @@ class BatteryModel
|
||||||
*/
|
*/
|
||||||
protected $batteries;
|
protected $batteries;
|
||||||
|
|
||||||
|
// flag if model is active
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean", options={"default": true})
|
||||||
|
*/
|
||||||
|
protected $flag_active;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->batteries = new ArrayCollection();
|
$this->batteries = new ArrayCollection();
|
||||||
|
|
||||||
|
$this->flag_active = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getID()
|
public function getID()
|
||||||
|
|
@ -76,4 +84,15 @@ class BatteryModel
|
||||||
|
|
||||||
return $str_batteries;
|
return $str_batteries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isActive()
|
||||||
|
{
|
||||||
|
return $this->flag_active;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setActive($flag_active = true)
|
||||||
|
{
|
||||||
|
$this->flag_active = $flag_active;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue