Initial project import for team collaboration.
Exclude local docs, MCP, and secrets via gitignore. Made-with: Cursor
This commit is contained in:
19
app/Models/MenuTypeModel.php
Normal file
19
app/Models/MenuTypeModel.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class MenuTypeModel extends Model
|
||||
{
|
||||
protected $table = 'menu_type';
|
||||
protected $primaryKey = 'mt_idx';
|
||||
protected $returnType = 'object';
|
||||
protected $useTimestamps = false;
|
||||
protected $allowedFields = ['mt_code', 'mt_name', 'mt_sort'];
|
||||
|
||||
public function getByCode(string $code): ?object
|
||||
{
|
||||
return $this->where('mt_code', $code)->first();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user