[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

@@ -95,15 +95,15 @@ class GroupBlock
return [
'name' => 'group_block',
'fields' => [
'group_id' => ['type' => 'int', 'not null' => true, 'description' => 'group profile is blocked from'],
'blocked_profile' => ['type' => 'int', 'not null' => true, 'description' => 'profile that is blocked'],
'group_id' => ['type' => 'int', 'not null' => true, 'description' => 'group gsactor is blocked from'],
'blocked_gsactor' => ['type' => 'int', 'not null' => true, 'description' => 'gsactor that is blocked'],
'blocker_user' => ['type' => 'int', 'not null' => true, 'description' => 'user making the block'],
'modified' => ['type' => 'timestamp', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'],
],
'primary key' => ['group_id', 'blocked_profile'],
'primary key' => ['group_id', 'blocked_gsactor'],
'foreign keys' => [
'group_block_group_id_fkey' => ['group', ['group_id' => 'id']],
'group_block_blocked_fkey' => ['profile', ['blocked_profile' => 'id']],
'group_block_blocked_fkey' => ['gsactor', ['blocked_gsactor' => 'id']],
'group_block_blocker_fkey' => ['user', ['blocker_user' => 'id']],
],
];