2020-06-12 22:41:09 +02:00
|
|
|
<?php
|
2020-08-04 13:25:22 +02:00
|
|
|
|
2021-06-08 11:52:11 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-06-12 22:41:09 +02:00
|
|
|
/**
|
2021-05-19 18:35:13 +02:00
|
|
|
* Class AnalyticsPodcastsByCountry Entity for AnalyticsPodcastsByCountry
|
|
|
|
*
|
2020-06-12 22:41:09 +02:00
|
|
|
* @copyright 2020 Podlibre
|
|
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
|
|
* @link https://castopod.org/
|
|
|
|
*/
|
2020-08-04 13:25:22 +02:00
|
|
|
|
2021-04-14 17:58:40 +02:00
|
|
|
namespace Analytics\Entities;
|
2020-06-12 22:41:09 +02:00
|
|
|
|
2021-05-06 16:00:48 +02:00
|
|
|
use CodeIgniter\Entity\Entity;
|
2020-06-12 22:41:09 +02:00
|
|
|
|
2021-05-12 16:00:25 +02:00
|
|
|
/**
|
|
|
|
* @property int $podcast_id
|
|
|
|
* @property string $country_code
|
|
|
|
* @property string $labels
|
|
|
|
* @property Time $date
|
|
|
|
* @property int $hits
|
|
|
|
* @property Time $created_at
|
|
|
|
* @property Time $updated_at
|
|
|
|
*/
|
2020-06-12 22:41:09 +02:00
|
|
|
class AnalyticsPodcastsByCountry extends Entity
|
|
|
|
{
|
2020-11-30 12:45:41 +01:00
|
|
|
/**
|
2021-05-12 16:00:25 +02:00
|
|
|
* @var string[]
|
2020-11-30 12:45:41 +01:00
|
|
|
*/
|
2021-05-12 16:00:25 +02:00
|
|
|
protected $dates = ['date', 'created_at', 'updated_at'];
|
2020-11-30 12:45:41 +01:00
|
|
|
|
2021-05-06 16:00:48 +02:00
|
|
|
/**
|
|
|
|
* @var array<string, string>
|
|
|
|
*/
|
2020-06-12 22:41:09 +02:00
|
|
|
protected $casts = [
|
|
|
|
'podcast_id' => 'integer',
|
|
|
|
'country_code' => 'string',
|
|
|
|
'hits' => 'integer',
|
|
|
|
];
|
2020-10-14 12:38:48 +02:00
|
|
|
|
2021-05-14 19:59:35 +02:00
|
|
|
public function getLabels(): string
|
2020-10-14 12:38:48 +02:00
|
|
|
{
|
|
|
|
return lang('Countries.' . $this->attributes['labels']);
|
|
|
|
}
|
2020-06-12 22:41:09 +02:00
|
|
|
}
|