mirror of
https://code.castopod.org/adaures/castopod.git
synced 2024-09-27 20:21:59 +02:00
feat: add platform models
This commit is contained in:
parent
ce5934419a
commit
a333d29196
31
app/Models/PlatformLinkModel.php
Normal file
31
app/Models/PlatformLinkModel.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Class PlatformLinkModel
|
||||
* Model for platform links table in database
|
||||
* @author Benjamin Bellamy <ben@podlibre.org>
|
||||
* @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 PlatformLinkModel extends Model
|
||||
{
|
||||
protected $table = 'platform_links';
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $allowedFields = [
|
||||
'podcast_id',
|
||||
'platform_id',
|
||||
'link_url',
|
||||
'comment',
|
||||
'visible',
|
||||
];
|
||||
|
||||
protected $returnType = 'App\Entities\PlatformLink';
|
||||
protected $useSoftDeletes = false;
|
||||
|
||||
protected $useTimestamps = true;
|
||||
}
|
36
app/Models/PlatformModel.php
Normal file
36
app/Models/PlatformModel.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Class PlatformModel
|
||||
* Model for platforms table in database
|
||||
* @author Benjamin Bellamy <ben@podlibre.org>
|
||||
* @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 PlatformModel extends Model
|
||||
{
|
||||
protected $table = 'platforms';
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $allowedFields = [
|
||||
'name',
|
||||
'home_url',
|
||||
'submit_url',
|
||||
'iosapp_url',
|
||||
'androidapp_url',
|
||||
'comment',
|
||||
'display_by_default',
|
||||
'ios_deeplink',
|
||||
'android_deeplink',
|
||||
'logo_file_name',
|
||||
];
|
||||
|
||||
protected $returnType = 'App\Entities\Platform';
|
||||
protected $useSoftDeletes = false;
|
||||
|
||||
protected $useTimestamps = true;
|
||||
}
|
Loading…
Reference in New Issue
Block a user