<?php

namespace App\Models\Member;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;


class MemAuthLog extends Model
{
    protected $table = 'mem_auth_log';
    protected $primaryKey = 'seq';
    public $incrementing = true;
    protected $keyType = 'int';
    public $timestamps = false;

    protected $guarded = [];

    protected $casts = [
        'info' => 'array',
    ];

    public const STATE_S = 'S'; // success
    public const STATE_F = 'F'; // fail
    public const STATE_P = 'P'; // pass/processing

    public function member(): BelongsTo
    {
        return $this->belongsTo(MemInfo::class, 'mem_no', 'mem_no');
    }
}
