ultimatepos/Modules/IndustrialEngineering/Models/CompetitiveBenchmark.php

36 lines
801 B
PHP

<?php
namespace Modules\IndustrialEngineering\Models;
use Illuminate\Database\Eloquent\Model;
class CompetitiveBenchmark extends Model
{
use BelongsToBusiness;
protected $table = 'ie_competitive_benchmarks';
protected $guarded = ['id'];
protected $casts = [
'our_value' => 'decimal:4',
'competitor_value' => 'decimal:4',
'delta_percent' => 'decimal:2',
];
public function researchProject()
{
return $this->belongsTo(ResearchProject::class, 'research_project_id');
}
public function lineRevision()
{
return $this->belongsTo(LineRevision::class, 'line_revision_id');
}
public function competitiveProduct()
{
return $this->belongsTo(CompetitiveProduct::class, 'competitive_product_id');
}
}