]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - classes/Deleted_notice.php
Prepare for ActivityModerationPlugin
[quix0rs-gnu-social.git] / classes / Deleted_notice.php
1 <?php
2 /*
3  * Laconica - a distributed open-source microblogging tool
4  * Copyright (C) 2008, 2009, Control Yourself, Inc.
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Affero General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the
14  * GNU Affero General Public License for more details.
15  *
16  * You should have received a copy of the GNU Affero General Public License
17  * along with this program.     If not, see <http://www.gnu.org/licenses/>.
18  */
19
20 if (!defined('GNUSOCIAL')) { exit(1); }
21
22 /**
23  * Table Definition for deleted_notice
24  */
25
26 class Deleted_notice extends Managed_DataObject
27 {
28     public $__table = 'deleted_notice';      // table name
29     public $id;                              // int(4)  primary_key not_null
30     public $profile_id;                      // int(4)   not_null
31     public $uri;                             // varchar(191)  unique_key   not 255 because utf8mb4 takes more space
32     public $created;                         // datetime()   not_null
33     public $deleted;                         // datetime()   not_null
34
35     public static function schemaDef()
36     {
37         return array(
38             'fields' => array(
39                 'id' => array('type' => 'int', 'not null' => true, 'description' => 'identity of notice'),
40                 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'author of the notice'),
41                 'uri' => array('type' => 'varchar', 'length' => 191, 'description' => 'universally unique identifier, usually a tag URI'),
42                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the notice record was created'),
43                 'deleted' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the notice record was created'),
44             ),
45             'primary key' => array('id'),
46             'unique keys' => array(
47                 'deleted_notice_uri_key' => array('uri'),
48             ),
49             'indexes' => array(
50                 'deleted_notice_profile_id_idx' => array('profile_id'),
51             ),
52         );
53     }
54 }