Initial project import for team collaboration.
Exclude local docs, MCP, and secrets via gitignore. Made-with: Cursor
This commit is contained in:
44
app/Models/MemberModel.php
Normal file
44
app/Models/MemberModel.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user