Fix table names and add more attributes for tags

feature/core
Sven Slootweg 11 years ago
parent 451c80b605
commit 1b50c941bc

@ -15,9 +15,9 @@ if(!isset($_APP)) { die("Unauthorized."); }
class Property extends CPHPDatabaseRecordClass class Property extends CPHPDatabaseRecordClass
{ {
public $table_name = "nodes"; public $table_name = "properties";
public $fill_query = "SELECT * FROM nodes WHERE `Id` = :Id"; public $fill_query = "SELECT * FROM properties WHERE `Id` = :Id";
public $verify_query = "SELECT * FROM nodes WHERE `Id` = :Id"; public $verify_query = "SELECT * FROM properties WHERE `Id` = :Id";
public $prototype = array( public $prototype = array(
'string' => array( 'string' => array(

@ -15,9 +15,9 @@ if(!isset($_APP)) { die("Unauthorized."); }
class Tag extends CPHPDatabaseRecordClass class Tag extends CPHPDatabaseRecordClass
{ {
public $table_name = "table"; public $table_name = "tags";
public $fill_query = "SELECT * FROM table WHERE `Id` = :Id"; public $fill_query = "SELECT * FROM tags WHERE `Id` = :Id";
public $verify_query = "SELECT * FROM table WHERE `Id` = :Id"; public $verify_query = "SELECT * FROM tags WHERE `Id` = :Id";
public $prototype = array( public $prototype = array(
'string' => array( 'string' => array(
@ -25,6 +25,19 @@ class Tag extends CPHPDatabaseRecordClass
), ),
'numeric' => array( 'numeric' => array(
"NodeId" => "NodeId" "NodeId" => "NodeId"
"CreatorId" => "CreatorId",
"RemoverId" => "RemoverId"
),
'timestamp' => array(
"CreationDate" => "CreationDate",
"RemovalDate" => "RemovalDate"
),
'boolean' => array(
"IsActive" => "IsActive"
),
'user' => array(
"Creator" => "CreatorId",
"Remover" => "RemoverId"
), ),
'node' => array( 'node' => array(
"Node" => "NodeId" "Node" => "NodeId"

Loading…
Cancel
Save