<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;

class Book extends Model
{
    protected $table = 'addressbooks'; // Sabre table
    public $timestamps = false;

    public function cards(): HasMany
    {
        return $this->hasMany(Card::class, 'addressbookid');
    }

    public function meta(): HasOne
    {
        return $this->hasOne(BookMeta::class, 'addressbook_id');
    }
}
