Files
sam-manage/app/Models/Juil/PmisMaterial.php
김보곤 39a8d8e2df refactor: [db] 모델 connection을 codebridge로 변경 + 마이그레이션 파일 전체 삭제
- PMIS 모델 21개 + DailyWorkLog 2개에 $connection = 'codebridge' 추가
- MNG 마이그레이션 파일 18개 전체 삭제 (API에서 관리)
- 원칙: MNG는 마이그레이션 파일을 생성하지 않고 API에서만 관리
2026-03-19 20:54:17 +09:00

37 lines
706 B
PHP

<?php
namespace App\Models\Juil;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class PmisMaterial extends Model
{
use SoftDeletes;
protected $connection = 'codebridge';
protected $table = 'pmis_materials';
protected $fillable = [
'tenant_id',
'company_name',
'material_code',
'material_name',
'specification',
'unit',
'design_quantity',
'options',
];
protected $casts = [
'design_quantity' => 'decimal:2',
'options' => 'array',
];
public function scopeTenant($query, $tenantId)
{
return $query->where('tenant_id', $tenantId);
}
}