Added columns in model files of Item and line and production plan and production quantity
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Has been cancelled
Laravel Larastan / larastan (pull_request) Has been cancelled
Laravel Pint / pint (pull_request) Has been cancelled

This commit is contained in:
dhanabalan
2026-02-19 11:29:02 +05:30
parent b9812cbe32
commit 5ba59e10bd
4 changed files with 44 additions and 17 deletions

View File

@@ -16,9 +16,12 @@ class ProductionPlan extends Model
protected $fillable = [
'plant_id',
'shift_id',
'item_id',
'line_id',
'plan_quantity',
'production_quantity',
'working_days',
'leave_dates',
'operator_id',
'created_at',
'updated_at',
@@ -39,6 +42,11 @@ class ProductionPlan extends Model
return $this->belongsTo(Line::class);
}
public function item(): BelongsTo
{
return $this->belongsTo(Item::class);
}
public function prunable(): Builder
{
return static::where('created_at', '<=', now()->subMonthsNoOverflow(6));