初始化
缺陷:主题配色需要优化整体的同风格
This commit is contained in:
23
app/Models/business/FactoryImageModel.php
Normal file
23
app/Models/business/FactoryImageModel.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\business;
|
||||
|
||||
use App\BaseApp\BaseBusinessModel;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* 工厂产品图(cc_factory_image)
|
||||
*
|
||||
* 外键列名就叫 factory(不是 factory_id),沿用老表不改。
|
||||
*/
|
||||
class FactoryImageModel extends BaseBusinessModel
|
||||
{
|
||||
protected $table = 'factory_image';
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
public function factoryInfo(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(FactoryInfoModel::class, 'factory', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user