]> git.mxchange.org Git - friendica.git/blob - doc/database/db_item.md
Improve Addons documentation
[friendica.git] / doc / database / db_item.md
1 Table item
2 ==========
3
4 | Field         | Description                                                                                                                                                | Type                | Null | Key | Default             | Extra          |
5 |---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|------|-----|---------------------|----------------|
6 | id            | sequential ID                                                                                                                                              | int(10) unsigned    | NO   | PRI | NULL                | auto_increment |
7 | guid          | A unique identifier for this item                                                                                                                          | varchar(255)        | NO   | MUL |                     |                |
8 | uri           |                                                                                                                                                            | varchar(255)        | NO   | MUL |                     |                |
9 | uid           | user.id which owns this copy of the item                                                                                                                   | int(10) unsigned    | NO   | MUL | 0                   |                |
10 | contact-id    | contact.id                                                                                                                                                 | int(11)             | NO   | MUL | 0                   |                |
11 | gcontact-id   | ID of the global contact                                                                                                                                   | int(11)             | NO   | MUL | 0                   |                |
12 | type          |                                                                                                                                                            | varchar(255)        | NO   |     |                     |                |
13 | wall          | This item was posted to the wall of uid                                                                                                                    | tinyint(1)          | NO   | MUL | 0                   |                |
14 | gravity       |                                                                                                                                                            | tinyint(1)          | NO   |     | 0                   |                |
15 | parent        | item.id of the parent to this item if it is a reply of some form; otherwise this must be set to the id of this item                                        | int(10) unsigned    | NO   | MUL | 0                   |                |
16 | parent-uri    | uri of the parent to this item                                                                                                                             | varchar(255)        | NO   | MUL |                     |                |
17 | extid         |                                                                                                                                                            | varchar(255         | NO   | MUL |                     |                |
18 | thr-parent    | If the parent of this item is not the top-level item in the conversation, the uri of the immediate parent; otherwise set to parent-uri                     | varchar(255)        | NO   |     |                     |                |
19 | created       | Creation timestamp.                                                                                                                                        | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
20 | edited        | Date of  last edit (default is created)                                                                                                                    | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
21 | commented     | Date of last comment/reply to this item                                                                                                                    | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
22 | received      | datetime                                                                                                                                                   | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
23 | changed       | Date that something in the conversation changed, indicating clients should fetch the conversation again                                                    | datetime            | NO   |     | 0001-01-01 00:00:00 |                |
24 | owner-name    | Name of the owner of this item                                                                                                                             | varchar(255)        | NO   |     |                     |                |
25 | owner-link    | Link to the profile page of the owner of this item                                                                                                         | varchar(255)        | NO   |     |                     |                |
26 | owner-avatar  | Link to the avatar picture of the owner of this item                                                                                                       | varchar(255)        | NO   |     |                     |                |
27 | owner-id      | Link to the contact table with uid=0 of the owner of this item                                                                                             | int(11)             | NO   | MUL | 0                   |                |
28 | author-name   | Name of the author of this item                                                                                                                            | varchar(255)        | NO   |     |                     |                |
29 | author-link   | Link to the profile page of the author of this item                                                                                                        | varchar(255)        | NO   |     |                     |                |
30 | author-avatar | Link to the avatar picture of the author of this item                                                                                                      | varchar(255)        | NO   |     |                     |                |
31 | author-id     | Link to the contact table with uid=0 of the author of this item                                                                                            | int(11)             | NO   | MUL | 0                   |                |
32 | title         | item title                                                                                                                                                 | varchar(255)        | NO   |     |                     |                |
33 | body          | item body content                                                                                                                                          | mediumtext          | NO   |     | NULL                |                |
34 | app           | application which generated this item                                                                                                                      | varchar(255)        | NO   |     |                     |                |
35 | verb          | ActivityStreams verb                                                                                                                                       | varchar(255)        | NO   |     |                     |                |
36 | object-type   | ActivityStreams object type                                                                                                                                | varchar(255)        | NO   |     |                     |                |
37 | object        | JSON encoded object structure unless it is an implied object (normal post)                                                                                 | text                | NO   |     | NULL                |                |
38 | target-type   | ActivityStreams target type if applicable (URI)                                                                                                            | varchar(255)        | NO   |     |                     |                |
39 | target        | JSON encoded target structure if used                                                                                                                      | text                | NO   |     | NULL                |                |
40 | postopts      | External post connectors add their network name to this comma-separated string to identify that they should be delivered to these networks during delivery | text                | NO   |     | NULL                |                |
41 | plink         | permalink or URL toa displayable copy  of the message at its source                                                                                        | varchar(255)        | NO   |     |                     |                |
42 | resource-id   | Used to link other tables to items, it identifies the linked resource (e.g. photo) and if set must also set resource_type                                  | varchar(255)        | NO   | MUL |                     |                |
43 | event-id      | Used to link to the event.id                                                                                                                               | int(11)             | NO   |     | 0                   |                |
44 | tag           |                                                                                                                                                            | mediumtext          | NO   |     | NULL                |                |
45 | attach        | JSON structure representing attachments to this item                                                                                                       | mediumtext          | NO   |     | NULL                |                |
46 | inform        |                                                                                                                                                            | mediumtext          | NO   |     | NULL                |                |
47 | file          |                                                                                                                                                            | mediumtext          | NO   |     | NULL                |                |
48 | location      | text location where this item originated                                                                                                                   | varchar(255)        | NO   |     |                     |                |
49 | coord         | longitude/latitude pair representing location where this item originated                                                                                   | varchar(255)        | NO   |     |                     |                |
50 | allow_cid     | Access Control - list of allowed contact.id '<19><78>'                                                                                                     | mediumtext          | NO   |     | NULL                |                |
51 | allow_gid     | Access Control - list of allowed groups                                                                                                                    | mediumtext          | NO   |     | NULL                |                |
52 | deny_cid      | Access Control - list of denied contact.id                                                                                                                 | mediumtext          | NO   |     | NULL                |                |
53 | deny_gid      | Access Control - list of denied groups                                                                                                                     | mediumtext          | NO   |     | NULL                |                |
54 | private       | distribution is restricted                                                                                                                                 | tinyint(1)          | NO   |     | 0                   |                |
55 | pubmail       |                                                                                                                                                            | tinyint(1)          | NO   |     | 0                   |                |
56 | moderated     |                                                                                                                                                            | tinyint(1)          | NO   |     | 0                   |                |
57 | visible       |                                                                                                                                                            | tinyint(1)          | NO   |     | 0                   |                |
58 | spam          |                                                                                                                                                            | tinyint(1)          | NO   |     | 0                   |                |
59 | starred       | item has been favourited                                                                                                                                   | tinyint(1)          | NO   |     | 0                   |                |
60 | bookmark      | item has been bookmarked                                                                                                                                   | tinyint(1)          | NO   |     | 0                   |                |
61 | unseen        | item has not been seen                                                                                                                                     | tinyint(1)          | NO   |     | 1                   |                |
62 | deleted       | item has been deleted                                                                                                                                      | tinyint(1)          | NO   | MUL | 0                   |                |
63 | origin        | item originated at this site                                                                                                                               | tinyint(1)          | NO   |     | 0                   |                |
64 | forum_mode    |                                                                                                                                                            | tinyint(1)          | NO   |     | 0                   |                |
65 | last-child    |                                                                                                                                                            | tinyint(1) unsigned | NO   |     | 1                   |                |
66 | mention       | The owner of this item was mentioned in it                                                                                                                 | tinyint(1)          | NO   |     | 0                   |                |
67 | network       | Network from where the item comes from                                                                                                                     | varchar(32)         | NO   |     |                     |                |
68 | rendered-hash |                                                                                                                                                            | varchar(32)         | NO   |     |                     |                |
69 | rendered-html | item.body converted to html                                                                                                                                | mediumtext          | NO   |     | NULL                |                |
70 | global        |                                                                                                                                                            | tinyint(1)          | NO   |     | 0                   |                |
71
72 Return to [database documentation](help/database)