Restore local changes after Git corruption
This commit is contained in:
@@ -10,20 +10,20 @@ class PcBuild extends Model
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'name',
|
||||
'description',
|
||||
'user_id',
|
||||
'is_ai_generated',
|
||||
'ai_prompt',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'is_ai_generated' => 'boolean',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
];
|
||||
// 👇 Связь "многие-ко-многим" с компонентами
|
||||
public function components()
|
||||
{
|
||||
return $this->belongsToMany(Component::class, 'pc_build_components');
|
||||
}
|
||||
|
||||
// Связь с пользователем
|
||||
// Если хотите, можно добавить обратную связь (опционально)
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
|
||||
Reference in New Issue
Block a user