2021-06-26 15:23:15 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace BookStack\Entities\Models;
|
2019-09-20 00:18:28 +01:00
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
|
|
|
|
|
|
/**
|
2021-06-26 15:23:15 +00:00
|
|
|
* Class BookChild.
|
|
|
|
|
*
|
2021-08-24 21:23:55 +01:00
|
|
|
* @property int $book_id
|
|
|
|
|
* @property int $priority
|
|
|
|
|
* @property string $book_slug
|
|
|
|
|
* @property Book $book
|
2019-09-20 00:18:28 +01:00
|
|
|
*/
|
2020-11-21 23:20:54 +00:00
|
|
|
abstract class BookChild extends Entity
|
2019-09-20 00:18:28 +01:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Get the book this page sits in.
|
2025-11-24 19:49:34 +00:00
|
|
|
* @return BelongsTo<Book, $this>
|
2019-09-20 00:18:28 +01:00
|
|
|
*/
|
|
|
|
|
public function book(): BelongsTo
|
|
|
|
|
{
|
2021-01-03 22:29:58 +00:00
|
|
|
return $this->belongsTo(Book::class)->withTrashed();
|
2019-09-20 00:18:28 +01:00
|
|
|
}
|
2019-10-05 12:55:01 +01:00
|
|
|
}
|