[CORE] Data Representation and Modelling refactor

This commit is contained in:
Hugo Sales
2020-08-12 23:57:22 +00:00
committed by Hugo Sales
parent b80479dc4e
commit 1111ee95f1
22 changed files with 155 additions and 422 deletions

View File

@@ -81,11 +81,11 @@ class FollowQueue
public static function schemaDef(): array
{
return [
'name' => 'Follow_queue',
'name' => 'follow_queue',
'description' => 'Holder for Follow requests awaiting moderation.',
'fields' => [
'follower' => ['type' => 'int', 'not null' => true, 'description' => 'remote or local profile making the request'],
'followed' => ['type' => 'int', 'not null' => true, 'description' => 'remote or local profile being followed to'],
'follower' => ['type' => 'int', 'not null' => true, 'description' => 'gsactor making the request'],
'followed' => ['type' => 'int', 'not null' => true, 'description' => 'gsactor being followed'],
'created' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was created'],
],
'primary key' => ['follower', 'followed'],
@@ -94,8 +94,8 @@ class FollowQueue
'Follow_queue_followed_created_idx' => ['followed', 'created'],
],
'foreign keys' => [
'Follow_queue_follower_fkey' => ['profile', ['follower' => 'id']],
'Follow_queue_followed_fkey' => ['profile', ['followed' => 'id']],
'Follow_queue_follower_fkey' => ['gsactor', ['follower' => 'id']],
'Follow_queue_followed_fkey' => ['gsactor', ['followed' => 'id']],
],
];
}