diff --git a/app/Models/PlatformLinkModel.php b/app/Models/PlatformLinkModel.php new file mode 100644 index 0000000000000000000000000000000000000000..8642a2df88ef3ae6b16de7702bdae8ee601c64fb --- /dev/null +++ b/app/Models/PlatformLinkModel.php @@ -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; +} \ No newline at end of file diff --git a/app/Models/PlatformModel.php b/app/Models/PlatformModel.php new file mode 100644 index 0000000000000000000000000000000000000000..58765cd642e758be4fe5c1cf58d8d7cadc9e732e --- /dev/null +++ b/app/Models/PlatformModel.php @@ -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; +} \ No newline at end of file