Changed order of functions.
This commit is contained in:
@@ -9,6 +9,7 @@ use traits\db_object_t;
|
||||
class departments_o extends db
|
||||
{
|
||||
use db_object_t;
|
||||
|
||||
public object_property $name;
|
||||
public object_property $description;
|
||||
|
||||
@@ -17,12 +18,6 @@ class departments_o extends db
|
||||
$this->setTable('departments');
|
||||
}
|
||||
|
||||
public function getObjectProperties(): void
|
||||
{
|
||||
$this->name = new object_property($this->table, $this->id, 'name', 'string', true);
|
||||
$this->description = new object_property($this->table, $this->id, 'description', 'string', false);
|
||||
}
|
||||
|
||||
public function create(string $name, string $description): void
|
||||
{
|
||||
global $db;
|
||||
@@ -40,6 +35,12 @@ class departments_o extends db
|
||||
$this->getObjectProperties();
|
||||
}
|
||||
|
||||
public function getObjectProperties(): void
|
||||
{
|
||||
$this->name = new object_property($this->table, $this->id, 'name', 'string', true);
|
||||
$this->description = new object_property($this->table, $this->id, 'description', 'string', false);
|
||||
}
|
||||
|
||||
public function edit(int $id, string $name, string $description): void
|
||||
{
|
||||
global $db;
|
||||
|
||||
Reference in New Issue
Block a user