tag add mode

This commit is contained in:
xiaomlove
2022-10-30 17:30:24 +08:00
parent 0fe7b2f76f
commit 87a079b392
39 changed files with 164 additions and 76 deletions

View File

@@ -7,7 +7,9 @@ class Tag extends NexusModel
public $timestamps = true;
protected $fillable = [
'id', 'name', 'color', 'priority', 'created_at', 'updated_at', 'font_size', 'font_color', 'padding', 'margin', 'border_radius'
'id', 'name', 'color', 'priority', 'created_at', 'updated_at',
'font_size', 'font_color', 'padding', 'margin', 'border_radius',
'mode',
];
const DEFAULTS = [
@@ -66,6 +68,11 @@ class Tag extends NexusModel
return $this->hasMany(TorrentTag::class, 'tag_id');
}
public function search_box(): \Illuminate\Database\Eloquent\Relations\BelongsTo
{
return $this->belongsTo(SearchBox::class, 'mode', 'id');
}
}