Files
lgp-admin-plus-api/app/Models/business/FactoryInfoModel.php
LQ bcf54c2727 初始化
缺陷:主题配色需要优化整体的同风格
2026-08-14 23:21:21 +08:00

30 lines
724 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Models\business;
use App\BaseApp\BaseBusinessModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* 工厂管理cc_factory_info
*
* 外键列名就叫 classification不是 classification_id沿用老表不改。
*/
class FactoryInfoModel extends BaseBusinessModel
{
protected $table = 'factory_info';
protected $guarded = [];
public function classificationInfo(): BelongsTo
{
return $this->belongsTo(FactoryClassificationModel::class, 'classification', 'id');
}
public function images(): HasMany
{
return $this->hasMany(FactoryImageModel::class, 'factory', 'id');
}
}