Changed order of functions.

This commit is contained in:
Jepp9350
2024-12-19 10:55:21 +01:00
parent f5a6ade96a
commit a9565bfb29
+7 -6
View File
@@ -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;