Files
spa-api/app/Models/TechnologyStackModal.php

27 lines
537 B
PHP
Raw Normal View History

2025-04-28 16:15:09 +08:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
2025-04-28 16:45:23 +08:00
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
2025-04-28 16:15:09 +08:00
/**
* 技术栈表
*/
class TechnologyStackModal extends Model
{
//
protected $table = 'technology_stacks';
protected $guarded = [];
2025-04-28 16:45:23 +08:00
/**
* 项目关联
* @return BelongsToMany
*/
public function projects(): BelongsToMany
{
return $this->belongsToMany(ProjectModal::class, 'project_technology_stack_relations', 'technology_stack_id', 'project_id');
}
2025-04-28 16:15:09 +08:00
}