mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 11:27:24 +08:00
tag and installer&updater use english
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class Tag extends NexusModel
|
||||
{
|
||||
public $timestamps = true;
|
||||
|
||||
protected $fillable = [
|
||||
'id', 'name', 'color', 'priority', 'created_at', 'updated_at'
|
||||
];
|
||||
|
||||
const DEFAULTS = [
|
||||
[
|
||||
'id' => 1,
|
||||
'name' => '禁转',
|
||||
'color' => '#ff0000',
|
||||
],
|
||||
[
|
||||
'id' => 2,
|
||||
'name' => '首发',
|
||||
'color' => '#8F77B5',
|
||||
],
|
||||
[
|
||||
'id' => 3,
|
||||
'name' => '官方',
|
||||
'color' => '#0000ff',
|
||||
],
|
||||
[
|
||||
'id' => 4,
|
||||
'name' => 'DIY',
|
||||
'color' => '#46d5ff',
|
||||
],
|
||||
[
|
||||
'id' => 5,
|
||||
'name' => '国语',
|
||||
'color' => '#6a3906',
|
||||
],
|
||||
[
|
||||
'id' => 6,
|
||||
'name' => '中字',
|
||||
'color' => '#006400',
|
||||
],
|
||||
[
|
||||
'id' => 7,
|
||||
'name' => 'HDR',
|
||||
'color' => '#38b03f',
|
||||
],
|
||||
];
|
||||
|
||||
public function torrents(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Torrent::class, 'torrent_tags', 'tag_id', 'torrent_id');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user