2021-04-02 17:20:02 +00:00
|
|
|
<?php
|
|
|
|
|
2021-06-08 09:52:11 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2021-04-02 17:20:02 +00:00
|
|
|
/**
|
2022-02-19 16:06:11 +00:00
|
|
|
* @copyright 2021 Ad Aures
|
2021-04-02 17:20:02 +00:00
|
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
|
|
* @link https://castopod.org/
|
|
|
|
*/
|
|
|
|
|
2021-08-23 11:05:16 +00:00
|
|
|
namespace Modules\Fediverse\Entities;
|
2021-04-02 17:20:02 +00:00
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
use CodeIgniter\Entity\Entity;
|
2021-04-02 17:20:02 +00:00
|
|
|
|
2021-05-12 14:00:25 +00:00
|
|
|
/**
|
|
|
|
* @property int $id
|
2021-08-13 11:07:29 +00:00
|
|
|
* @property string $post_id
|
2021-05-12 14:00:25 +00:00
|
|
|
* @property string $url
|
|
|
|
* @property string $title
|
|
|
|
* @property string $description
|
|
|
|
* @property string $type
|
|
|
|
* @property string|null $author_name
|
|
|
|
* @property string|null $author_url
|
|
|
|
* @property string|null $provider_name
|
|
|
|
* @property string|null $provider_url
|
|
|
|
* @property string|null $image
|
|
|
|
* @property string|null $html
|
|
|
|
*/
|
2021-04-02 17:20:02 +00:00
|
|
|
class PreviewCard extends Entity
|
|
|
|
{
|
2021-05-06 14:00:48 +00:00
|
|
|
/**
|
|
|
|
* @var array<string, string>
|
|
|
|
*/
|
2021-04-02 17:20:02 +00:00
|
|
|
protected $casts = [
|
2023-06-12 14:47:38 +00:00
|
|
|
'id' => 'integer',
|
|
|
|
'post_id' => 'string',
|
|
|
|
'url' => 'string',
|
|
|
|
'title' => 'string',
|
|
|
|
'description' => 'string',
|
|
|
|
'type' => 'string',
|
|
|
|
'author_name' => '?string',
|
|
|
|
'author_url' => '?string',
|
2021-04-02 17:20:02 +00:00
|
|
|
'provider_name' => '?string',
|
2023-06-12 14:47:38 +00:00
|
|
|
'provider_url' => '?string',
|
|
|
|
'image' => '?string',
|
|
|
|
'html' => '?string',
|
2021-04-02 17:20:02 +00:00
|
|
|
];
|
|
|
|
}
|