登录注册功能
This commit is contained in:
35
app/Models/ProjectLabelRelationModel.php
Normal file
35
app/Models/ProjectLabelRelationModel.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\BaseApp\BaseModel;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
|
||||
/**
|
||||
* 项目标签关联表
|
||||
*/
|
||||
class ProjectLabelRelationModel extends BaseModel
|
||||
{
|
||||
//
|
||||
protected $table = 'project_label_relations';
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* 项目
|
||||
* @return HasOne
|
||||
*/
|
||||
public function project(): HasOne
|
||||
{
|
||||
return $this->hasOne(ProjectModel::class, 'id', 'project_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 标签
|
||||
* @return HasOne
|
||||
*/
|
||||
public function label(): HasOne
|
||||
{
|
||||
return $this->hasOne(LabelModel::class, 'id', 'label_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user