. // }}} namespace App\Entity; use App\Core\Entity; use DateTimeInterface; /** * Entity for location namespace * * @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-2021 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ class LocationService extends Entity { // {{{ Autocode // @codeCoverageIgnoreStart private int $id; private ?string $description = null; private \DateTimeInterface $created; private \DateTimeInterface $modified; public function setId(int $id): self { $this->id = $id; return $this; } public function getId(): int { return $this->id; } public function setDescription(?string $description): self { $this->description = \is_null($description) ? null : \mb_substr($description, 0, 191); return $this; } public function getDescription(): ?string { return $this->description; } public function setCreated(\DateTimeInterface $created): self { $this->created = $created; return $this; } public function getCreated(): \DateTimeInterface { return $this->created; } public function setModified(\DateTimeInterface $modified): self { $this->modified = $modified; return $this; } public function getModified(): \DateTimeInterface { return $this->modified; } // @codeCoverageIgnoreEnd // }}} Autocode public static function schemaDef(): array { return [ 'name' => 'location_service', 'fields' => [ 'id' => ['type' => 'int', 'size' => 'tiny', 'not null' => true, 'description' => 'identifier for the location service'], 'description' => ['type' => 'varchar', 'length' => 191, 'description' => 'description of the service'], 'created' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was created'], 'modified' => ['type' => 'timestamp', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'], ], 'primary key' => ['id'], ]; } }