2020-12-07 20:13:46 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @copyright 2020 Podlibre
|
|
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
|
|
* @link https://castopod.org/
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Entities;
|
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
use CodeIgniter\Entity\Entity;
|
2020-12-07 20:13:46 +00:00
|
|
|
|
|
|
|
class Soundbite extends Entity
|
|
|
|
{
|
2021-05-06 14:00:48 +00:00
|
|
|
/**
|
|
|
|
* @var array<string, string>
|
|
|
|
*/
|
2020-12-07 20:13:46 +00:00
|
|
|
protected $casts = [
|
|
|
|
'id' => 'integer',
|
|
|
|
'podcast_id' => 'integer',
|
|
|
|
'episode_id' => 'integer',
|
|
|
|
'start_time' => 'float',
|
|
|
|
'duration' => 'float',
|
|
|
|
'label' => '?string',
|
|
|
|
'created_by' => 'integer',
|
|
|
|
'updated_by' => 'integer',
|
|
|
|
];
|
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
public function setUpdatedBy(User $user): self
|
2020-12-07 20:13:46 +00:00
|
|
|
{
|
|
|
|
$this->attributes['updated_by'] = $user->id;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
}
|