Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/Entities/Nas.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

namespace IctSolutions\CodeIgniterFreeRadius\Entities;

use CodeIgniter\Entity\Entity;

/**
* Class Nas
*
* @property string $community
* @property string $description
* @property int $id
* @property string $nasname
* @property int $ports
* @property string $secret
* @property string $server
* @property string $shortname
* @property string $type
*/
class Nas extends Entity
{
/**
* @var array<string, string>
*/
protected $casts = [
'id' => 'int',
'nasname' => 'string',
'shortname' => 'string',
'type' => 'string',
'ports' => 'int',
'secret' => 'string',
'server' => 'string',
'community' => 'string',
'description' => 'string',
];
}
34 changes: 34 additions & 0 deletions src/Models/NasModel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

declare(strict_types=1);

namespace IctSolutions\CodeIgniterFreeRadius\Models;

use IctSolutions\CodeIgniterFreeRadius\Entities\Nas;

class NasModel extends BaseModel
{
protected $primaryKey = 'id';
protected $returnType = Nas::class;
protected $allowedFields = [
'nasname',
'shortname',
'type',
'ports',
'secret',
'server',
'community',
'description',
];
protected $useTimestamps = false;
protected $validationRules = [];
protected $validationMessages = [];
protected $skipValidation = false;

protected function initialize(): void
{
parent::initialize();

$this->table = $this->tables['nas'];
}
}
Loading