]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Models/Book.php
Added testing coverage for tag index
[bookstack] / app / Entities / Models / Book.php
index df30c1c714abb4fff2ddd9d92e2b3c4fa6119623..982df5c90a703f588b96045ae2a40bbb87fa04df 100644 (file)
@@ -4,6 +4,7 @@ namespace BookStack\Entities\Models;
 
 use BookStack\Uploads\Image;
 use Exception;
+use Illuminate\Database\Eloquent\Factories\HasFactory;
 use Illuminate\Database\Eloquent\Relations\BelongsTo;
 use Illuminate\Database\Eloquent\Relations\BelongsToMany;
 use Illuminate\Database\Eloquent\Relations\HasMany;
@@ -12,12 +13,17 @@ use Illuminate\Support\Collection;
 /**
  * Class Book.
  *
- * @property string     $description
- * @property int        $image_id
- * @property Image|null $cover
+ * @property string                                   $description
+ * @property int                                      $image_id
+ * @property Image|null                               $cover
+ * @property \Illuminate\Database\Eloquent\Collection $chapters
+ * @property \Illuminate\Database\Eloquent\Collection $pages
+ * @property \Illuminate\Database\Eloquent\Collection $directPages
  */
 class Book extends Entity implements HasCoverImage
 {
+    use HasFactory;
+
     public $searchFactor = 2;
 
     protected $fillable = ['name', 'description'];