mirror of
https://github.com/HDInnovations/UNIT3D.git
synced 2026-01-31 01:35:31 +01:00
57 lines
1.7 KiB
PHP
57 lines
1.7 KiB
PHP
<?php
|
|
/**
|
|
* NOTICE OF LICENSE.
|
|
*
|
|
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
|
|
* The details is bundled with this project in the file LICENSE.txt.
|
|
*
|
|
* @project UNIT3D Community Edition
|
|
*
|
|
* @author HDVinnie <hdinnovations@protonmail.com>
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Traits\Auditable;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* App\Models\Tag.
|
|
*
|
|
* @property int $id
|
|
* @property string|null $name
|
|
* @property string|null $slug
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Torrent[] $torrents
|
|
* @property-read int|null $torrents_count
|
|
*
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Tag newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Tag newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Tag query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Tag whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Tag whereName($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Tag whereSlug($value)
|
|
* @mixin \Eloquent
|
|
*/
|
|
class Tag extends Model
|
|
{
|
|
use Auditable;
|
|
|
|
/**
|
|
* Indicates If The Model Should Be Timestamped.
|
|
*
|
|
* @var bool
|
|
*/
|
|
public $timestamps = false;
|
|
|
|
/**
|
|
* Belongs To Many Torrents.
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
|
*/
|
|
public function torrents()
|
|
{
|
|
return $this->belongsToMany(Torrent::class);
|
|
}
|
|
}
|