<?php

namespace App\Models;

use App\Models\Traits\SerializeDate;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject;

class UseUser extends Authenticatable implements JWTSubject
{
    use HasApiTokens, HasFactory, Notifiable, SerializeDate;

    protected $fillable = [
        'user_address',
        'invitation_code'
    ];

    // 实现下面两个方法
    public function getJWTIdentifier()
    {
        return $this->getKey();
    }

    public function getJWTCustomClaims()
    {
        return [];
    }

    protected $table = 'use_user';

}
