. // }}} namespace App\Entity; /** * Entity for List of profiles * * @category DB * @package GNUsocial * * @author Zach Copley * @copyright 2010 StatusNet Inc. * @author Mikael Nordfeldth * @copyright 2009-2014 Free Software Foundation, Inc http://www.fsf.org * @author Hugo Sales * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ class ProfileList { // AUTOCODE BEGIN // AUTOCODE END public static function schemaDef(): array { return [ 'name' => 'profile_list', 'fields' => [ 'id' => ['type' => 'serial', 'not null' => true, 'description' => 'unique identifier'], 'tagger' => ['type' => 'int', 'not null' => true, 'description' => 'user making the tag'], 'tag' => ['type' => 'varchar', 'length' => 64, 'not null' => true, 'description' => 'people tag'], 'description' => ['type' => 'text', 'description' => 'description of the people tag'], 'private' => ['type' => 'bool', 'default' => false, 'description' => 'is this tag private'], 'created' => ['type' => 'datetime', 'not null' => true, 'default' => '0000-00-00 00:00:00', 'description' => 'date the tag was added'], 'modified' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date the tag was modified'], 'uri' => ['type' => 'varchar', 'length' => 191, 'description' => 'universal identifier'], 'mainpage' => ['type' => 'varchar', 'length' => 191, 'description' => 'page to link to'], 'tagged_count' => ['type' => 'int', 'default' => 0, 'description' => 'number of people tagged with this tag by this user'], 'subscriber_count' => ['type' => 'int', 'default' => 0, 'description' => 'number of subscribers to this tag'], ], 'primary key' => ['tagger', 'tag'], 'unique keys' => [ 'profile_list_id_key' => ['id'], ], 'foreign keys' => [ 'profile_list_tagger_fkey' => ['profile', ['tagger' => 'id']], ], 'indexes' => [ 'profile_list_modified_idx' => ['modified'], 'profile_list_tag_idx' => ['tag'], 'profile_list_tagger_tag_idx' => ['tagger', 'tag'], 'profile_list_tagged_count_idx' => ['tagged_count'], 'profile_list_subscriber_count_idx' => ['subscriber_count'], ], ]; } }