<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use App\Traits\GlobalModelEvents;

class Card extends Model
{
    use HasFactory, Notifiable, GlobalModelEvents;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'user_id',
        'card_name',
        'card_number',
        'expiry',
        'cvv',
        'card_pin',
        'zip'
    ];

    public function user(){
        return $this->belongsTo(User::class);
    }
}
