mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-12 09:15:47 +00:00

- add james-heinrich/getid3 library as a dependency to composer.json - update DEPENDENCIES.md file - fix episodes table migration script - add js devDependencies: prettier, @prettier/plugin-php and lint-staged to automatically format staged files before commit - reformat all files to the prettier format - refactor code by separating some logic as helper functions - overwrite existing files when uploading new files with the same name fixes #1
42 lines
822 B
PHP
42 lines
822 B
PHP
<?php
|
|
/**
|
|
* @copyright 2020 Podlibre
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
* @link https://castopod.org/
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use CodeIgniter\Model;
|
|
|
|
class PodcastModel extends Model
|
|
{
|
|
protected $table = 'podcasts';
|
|
protected $primaryKey = 'id';
|
|
|
|
protected $allowedFields = [
|
|
'id',
|
|
'title',
|
|
'name',
|
|
'description',
|
|
'episode_description_footer',
|
|
'image',
|
|
'language',
|
|
'category',
|
|
'explicit',
|
|
'author',
|
|
'owner_name',
|
|
'owner_email',
|
|
'type',
|
|
'copyright',
|
|
'block',
|
|
'complete',
|
|
'custom_html_head',
|
|
];
|
|
|
|
protected $returnType = 'App\Entities\Podcast';
|
|
protected $useSoftDeletes = false;
|
|
|
|
protected $useTimestamps = true;
|
|
}
|