mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-06-07 23:24:30 -04:00
refactor: Add getters for protected model properties
- Create BaseModel with getters for $table, $primaryKey, $allowedFields - All models now extend BaseModel instead of CodeIgniter\Model - Add type declarations to protected properties Closes #4489
This commit is contained in:
@@ -3,20 +3,16 @@
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Database\ResultInterface;
|
||||
use CodeIgniter\Model;
|
||||
use Config\OSPOS;
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Tax Code class
|
||||
*/
|
||||
class Tax_code extends Model
|
||||
class Tax_code extends BaseModel
|
||||
{
|
||||
protected $table = 'tax_codes';
|
||||
protected $primaryKey = 'tax_code_id';
|
||||
protected $useAutoIncrement = true;
|
||||
protected $useSoftDeletes = false;
|
||||
protected $allowedFields = [
|
||||
protected string $table = 'tax_codes';
|
||||
protected string $primaryKey = 'tax_code_id';
|
||||
protected bool $useAutoIncrement = true;
|
||||
protected bool $useSoftDeletes = false;
|
||||
protected array $allowedFields = [
|
||||
'tax_code',
|
||||
'tax_code_name',
|
||||
'city',
|
||||
|
||||
Reference in New Issue
Block a user