. // }}} namespace App\Entity; /** * Entity for user's email confimation * * @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 ConfirmAddress { // AUTOCODE BEGIN // AUTOCODE END public static function schemaDef(): array { return [ 'name' => 'confirm_address', 'fields' => [ 'code' => ['type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'good random code'], 'user_id' => ['type' => 'int', 'default' => 0, 'description' => 'user who requested confirmation'], 'address' => ['type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'address (email, xmpp, SMS, etc.)'], 'address_extra' => ['type' => 'varchar', 'length' => 191, 'description' => 'carrier ID, for SMS'], 'address_type' => ['type' => 'varchar', 'length' => 8, 'not null' => true, 'description' => 'address type ("email", "xmpp", "sms")'], 'claimed' => ['type' => 'datetime', 'description' => 'date this was claimed for queueing'], 'sent' => ['type' => 'datetime', 'description' => 'date this was sent for queueing'], 'modified' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'], ], 'primary key' => ['code'], 'foreign keys' => [ 'confirm_address_user_id_fkey' => ['user', ['user_id' => 'id']], ], ]; } }