mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 05:25:15 +02:00
Add fields to Report entity
- Add clock dependency to Moderation\Factory\Report - Change DateTime field to DateTimeImmutable to satisfy Clock return type - Add category, status and resolution constants
This commit is contained in:
parent
d29a84ae46
commit
76de49a25c
13 changed files with 543 additions and 222 deletions
|
@ -6,28 +6,39 @@ Table report
|
|||
Fields
|
||||
------
|
||||
|
||||
| Field | Description | Type | Null | Key | Default | Extra |
|
||||
| ----------- | ----------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- |
|
||||
| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment |
|
||||
| uid | Reporting user | mediumint unsigned | YES | | NULL | |
|
||||
| reporter-id | Reporting contact | int unsigned | YES | | NULL | |
|
||||
| cid | Reported contact | int unsigned | NO | | NULL | |
|
||||
| comment | Report | text | YES | | NULL | |
|
||||
| category | Category of the report (spam, violation, other) | varchar(20) | YES | | NULL | |
|
||||
| rules | Violated rules | text | YES | | NULL | |
|
||||
| forward | Forward the report to the remote server | boolean | YES | | NULL | |
|
||||
| created | | datetime | NO | | 0001-01-01 00:00:00 | |
|
||||
| status | Status of the report | tinyint unsigned | YES | | NULL | |
|
||||
| Field | Description | Type | Null | Key | Default | Extra |
|
||||
| --------------- | ------------------------------------------------------------ | ------------------ | ---- | --- | ------------------- | -------------- |
|
||||
| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment |
|
||||
| uid | Reporting user | mediumint unsigned | YES | | NULL | |
|
||||
| reporter-id | Reporting contact | int unsigned | YES | | NULL | |
|
||||
| cid | Reported contact | int unsigned | NO | | NULL | |
|
||||
| gsid | Reported contact server | int unsigned | NO | | NULL | |
|
||||
| comment | Report | text | YES | | NULL | |
|
||||
| category-id | Report category, one of Entity\Report::CATEGORY_* | int unsigned | NO | | 1 | |
|
||||
| forward | Forward the report to the remote server | boolean | YES | | NULL | |
|
||||
| public-remarks | Remarks shared with the reporter | text | YES | | NULL | |
|
||||
| private-remarks | Remarks shared with the moderation team | text | YES | | NULL | |
|
||||
| last-editor-uid | Last editor user | mediumint unsigned | YES | | NULL | |
|
||||
| assigned-uid | Assigned moderator user | mediumint unsigned | YES | | NULL | |
|
||||
| status | Status of the report, one of Entity\Report::STATUS_* | tinyint unsigned | NO | | NULL | |
|
||||
| resolution | Resolution of the report, one of Entity\Report::RESOLUTION_* | tinyint unsigned | YES | | NULL | |
|
||||
| created | | datetime(6) | NO | | 0001-01-01 00:00:00 | |
|
||||
| edited | Last time the report has been edited | datetime(6) | YES | | NULL | |
|
||||
|
||||
Indexes
|
||||
------------
|
||||
|
||||
| Name | Fields |
|
||||
| ----------- | ----------- |
|
||||
| PRIMARY | id |
|
||||
| uid | uid |
|
||||
| cid | cid |
|
||||
| reporter-id | reporter-id |
|
||||
| Name | Fields |
|
||||
| ----------------- | ------------------ |
|
||||
| PRIMARY | id |
|
||||
| uid | uid |
|
||||
| cid | cid |
|
||||
| reporter-id | reporter-id |
|
||||
| gsid | gsid |
|
||||
| assigned-uid | assigned-uid |
|
||||
| status-resolution | status, resolution |
|
||||
| created | created |
|
||||
| edited | edited |
|
||||
|
||||
Foreign Keys
|
||||
------------
|
||||
|
@ -37,5 +48,8 @@ Foreign Keys
|
|||
| uid | [user](help/database/db_user) | uid |
|
||||
| reporter-id | [contact](help/database/db_contact) | id |
|
||||
| cid | [contact](help/database/db_contact) | id |
|
||||
| gsid | [gserver](help/database/db_gserver) | id |
|
||||
| last-editor-uid | [user](help/database/db_user) | uid |
|
||||
| assigned-uid | [user](help/database/db_user) | uid |
|
||||
|
||||
Return to [database documentation](help/database)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue