前端打包

This commit is contained in:
liu
2026-08-09 11:15:38 +08:00
parent f67567bdc9
commit 9153c4eead
32 changed files with 1235 additions and 27 deletions
+15 -1
View File
@@ -3,6 +3,7 @@
namespace Modules\SystemTool\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;
/**
@@ -16,17 +17,21 @@ class SysGridNavModel extends Model
'status' => 'int',
'sort' => 'int',
'image_id' => 'int',
'link_type' => 'int',
'category_id' => 'int',
];
protected $fillable = [
'title',
'image_id',
'link',
'link_type',
'category_id',
'status',
'sort',
];
protected $with = ['image'];
protected $with = ['image', 'category'];
/**
* 关联图片
@@ -37,4 +42,13 @@ class SysGridNavModel extends Model
return $this->hasOne(SysFileModel::class, 'id', 'image_id');
}
/**
* 关联所属分类(link_type=1 时生效)
* @return BelongsTo
*/
public function category(): BelongsTo
{
return $this->belongsTo(SysCategoryModel::class, 'category_id', 'id');
}
}