feat : 내 정보 조회 API 추가

This commit is contained in:
2025-07-22 16:45:11 +09:00
parent 4c2ce55afb
commit 9f1e74159f
5 changed files with 115 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ class Member extends Authenticatable
{
use HasApiTokens, Notifiable, TwoFactorAuthenticatable;
protected $primaryKey = 'mb_id'; // 기본 키 변경
protected $primaryKey = 'mb_num'; // 기본 키 변경
protected $fillable = [
'mb_id', 'mb_pass', 'mb_name', 'mb_phone', 'mb_mail',
@@ -36,4 +36,10 @@ public function getAuthIdentifierName()
{
return 'mb_id'; // 기본 로그인 필드를 mb_id로 변경
}
public function company()
{
return $this->belongsTo(MemberCompany::class, 'tn_num', 'mc_num');
// members.tn_num = member_company.mc_num
}
}