<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class TaskSubmissionItem extends Model
{
    use HasFactory;

    protected $fillable = [
        'task_submission_id',
        'sort_order',
        'line_type',
        'line_label',
        'account_number',
        'entry_date',
        'entry_time',
        'description',
        'quantity',
        'quantity_unit',
        'quantity_screenshot_path',
        'quantity_screenshot_name',
        'total_quantity',
        'total_screenshot_path',
        'total_screenshot_name',
        'pending_quantity',
        'pending_screenshot_path',
        'pending_screenshot_name',
        'done_quantity',
        'done_screenshot_path',
        'done_screenshot_name',
    ];

    public function submission(): BelongsTo
    {
        return $this->belongsTo(TaskSubmission::class, 'task_submission_id');
    }
}
