mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-11 00:35:47 +00:00
32 lines
709 B
PHP
32 lines
709 B
PHP
<?php
|
|
|
|
/**
|
|
* Class AnalyticsPodcastsByRegion
|
|
* Entity for AnalyticsPodcastsByRegion
|
|
* @copyright 2020 Podlibre
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
* @link https://castopod.org/
|
|
*/
|
|
|
|
namespace App\Entities;
|
|
|
|
use CodeIgniter\Entity;
|
|
|
|
class AnalyticsPodcastsByRegion extends Entity
|
|
{
|
|
protected $casts = [
|
|
'podcast_id' => 'integer',
|
|
'country_code' => 'string',
|
|
'region_code' => '?string',
|
|
'latitude' => '?float',
|
|
'longitude' => '?float',
|
|
'date' => 'datetime',
|
|
'hits' => 'integer',
|
|
];
|
|
|
|
public function getCountryCode()
|
|
{
|
|
return lang('Countries.' . $this->attributes['country_code']);
|
|
}
|
|
}
|