<?php

namespace App\Models;

class Document {
    public ?int $id = null;
    public int $stage_id;
    public string $file_path;
    public string $file_name;
    public string $name_document;
    public string $description_document;
    public ?string $created_at = null;
    public string $file_tmp = "";
    public ?int $uploaded_by = null;

    public ?User $user = null;

    public function __construct(array $data = []) {
        $this->id = $data['id'] ?? null;
        $this->stage_id = $data['stage_id'] ?? 0;
        $this->file_name = $data['file_name'] ?? '';
        $this->file_tmp = $data['file_tmp'] ?? '';
        $this->file_path = $data['file_path'] ?? '';
        $this->uploaded_by = $data['uploaded_by'] ?? null;
        $this->user = $data['user'] ?? null;
        $this->created_at = $data['created_at'] ?? null;
        $this->name_document = $data['name_document'] ?? '';
        $this->description_document = $data['description_document'] ?? '';
    }
}