. // }}} namespace App\Entity; /** * Entity for Notice's location * * @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 NoticeLocation { // {{{ Autocode // }}} Autocode public static function schemaDef(): array { return [ 'name' => 'notice_location', 'fields' => [ 'notice_id' => ['type' => 'int', 'not null' => true, 'description' => 'notice that is the reply'], 'lat' => ['type' => 'numeric', 'precision' => 10, 'scale' => 7, 'description' => 'latitude'], 'lon' => ['type' => 'numeric', 'precision' => 10, 'scale' => 7, 'description' => 'longitude'], 'location_id' => ['type' => 'int', 'description' => 'location id if possible'], 'location_ns' => ['type' => 'int', 'description' => 'namespace for location'], 'modified' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'], ], 'primary key' => ['notice_id'], 'foreign keys' => [ 'notice_location_notice_id_fkey' => ['notice', ['notice_id' => 'id']], ], 'indexes' => [ 'notice_location_location_id_idx' => ['location_id'], ], ]; } }