style: Laravel Pint 코드 포맷팅 적용

- PSR-12 스타일 가이드 준수
- 302개 파일 스타일 이슈 자동 수정
- 코드 로직 변경 없음 (포맷팅만)
This commit is contained in:
2025-11-06 17:45:49 +09:00
parent 48e76432ee
commit cc206fdbed
294 changed files with 4476 additions and 2561 deletions

View File

@@ -12,8 +12,8 @@ class BomTemplate extends Model
protected $table = 'bom_templates';
protected $fillable = [
'tenant_id','model_version_id','name','is_primary','notes',
'calculation_schema','company_type','formula_version',
'tenant_id', 'model_version_id', 'name', 'is_primary', 'notes',
'calculation_schema', 'company_type', 'formula_version',
];
protected $casts = [
@@ -21,11 +21,13 @@ class BomTemplate extends Model
'calculation_schema' => 'array',
];
public function modelVersion() {
public function modelVersion()
{
return $this->belongsTo(ModelVersion::class, 'model_version_id');
}
public function items() {
public function items()
{
return $this->hasMany(BomTemplateItem::class, 'bom_template_id');
}
}

View File

@@ -9,8 +9,8 @@ class BomTemplateItem extends Model
protected $table = 'bom_template_items';
protected $fillable = [
'tenant_id','bom_template_id','ref_type','ref_id','qty','waste_rate','uom_id','notes','sort_order',
'is_calculated','calculation_formula','depends_on','calculation_config',
'tenant_id', 'bom_template_id', 'ref_type', 'ref_id', 'qty', 'waste_rate', 'uom_id', 'notes', 'sort_order',
'is_calculated', 'calculation_formula', 'depends_on', 'calculation_config',
];
protected $casts = [
@@ -21,7 +21,8 @@ class BomTemplateItem extends Model
'calculation_config' => 'array',
];
public function template() {
public function template()
{
return $this->belongsTo(BomTemplate::class, 'bom_template_id');
}
}

View File

@@ -12,7 +12,7 @@ class DesignModel extends Model
protected $table = 'models';
protected $fillable = [
'tenant_id','code','name','category_id','lifecycle','description','is_active',
'tenant_id', 'code', 'name', 'category_id', 'lifecycle', 'description', 'is_active',
];
protected $casts = [
@@ -20,7 +20,8 @@ class DesignModel extends Model
];
// 관계: 모델은 여러 버전을 가짐
public function versions() {
public function versions()
{
return $this->hasMany(ModelVersion::class, 'model_id');
}
}

View File

@@ -12,7 +12,7 @@ class ModelVersion extends Model
protected $table = 'model_versions';
protected $fillable = [
'tenant_id','model_id','version_no','status','effective_from','effective_to','notes','is_active',
'tenant_id', 'model_id', 'version_no', 'status', 'effective_from', 'effective_to', 'notes', 'is_active',
];
protected $casts = [
@@ -21,15 +21,18 @@ class ModelVersion extends Model
'effective_to' => 'datetime',
];
public function model() {
public function model()
{
return $this->belongsTo(DesignModel::class, 'model_id');
}
public function bomTemplates() {
public function bomTemplates()
{
return $this->hasMany(BomTemplate::class, 'model_version_id');
}
public function scopeReleased($q) {
public function scopeReleased($q)
{
return $q->where('status', 'RELEASED');
}
}