Files
jongryangje/app/Models/MemberModel.php
taekyoungc 4e557d4be1 Initial project import for team collaboration.
Exclude local docs, MCP, and secrets via gitignore.

Made-with: Cursor
2026-03-25 12:05:33 +09:00

45 lines
909 B
PHP

<?php
namespace App\Models;
use CodeIgniter\Model;
class MemberModel extends Model
{
protected $table = 'member';
protected $primaryKey = 'mb_idx';
protected $returnType = 'object';
protected $useTimestamps = false;
protected $allowedFields = [
'mb_id',
'mb_passwd',
'mb_name',
'mb_email',
'mb_phone',
'mb_lang',
'mb_level',
'mb_group',
'mb_lg_idx',
'mb_state',
'mb_regdate',
'mb_latestdate',
'mb_leavedate',
];
/**
* mb_id로 회원 조회
*/
public function findByLoginId(string $mbId): ?object
{
return $this->where('mb_id', $mbId)->first();
}
/**
* mb_id 중복 여부
*/
public function isIdExists(string $mbId): bool
{
return $this->where('mb_id', $mbId)->countAllResults() > 0;
}
}