<?hh // strict

namespace App\Models;

use DateTime;

class Job
{
    private int $id;
    private string $title;
    private string $description;
    private string $location;
    private string $employmentType;
    private string $tenantId;
    private DateTime $createdAt;
    private DateTime $updatedAt;
    
    public function __construct(
        int $id,
        string $title,
        string $description,
        string $location,
        string $employmentType,
        string $tenantId
    ) {
        $this->id = $id;
        $this->title = $title;
        $this->description = $description;
        $this->location = $location;
        $this->employmentType = $employmentType;
        $this->tenantId = $tenantId;
        $this->createdAt = new DateTime();
        $this->updatedAt = new DateTime();
    }
    
    // Getters
    public function getId(): int
    {
        return $this->id;
    }
    
    public function getTitle(): string
    {
        return $this->title;
    }
    
    public function getDescription(): string
    {
        return $this->description;
    }
    
    public function getLocation(): string
    {
        return $this->location;
    }
    
    public function getEmploymentType(): string
    {
        return $this->employmentType;
    }
    
    public function getTenantId(): string
    {
        return $this->tenantId;
    }
    
    public function getCreatedAt(): DateTime
    {
        return $this->createdAt;
    }
    
    public function getUpdatedAt(): DateTime
    {
        return $this->updatedAt;
    }
    
    // Setters
    public function setTitle(string $title): void
    {
        $this->title = $title;
        $this->updatedAt = new DateTime();
    }
    
    public function setDescription(string $description): void
    {
        $this->description = $description;
        $this->updatedAt = new DateTime();
    }
    
    public function setLocation(string $location): void
    {
        $this->location = $location;
        $this->updatedAt = new DateTime();
    }
    
    public function setEmploymentType(string $employmentType): void
    {
        $this->employmentType = $employmentType;
        $this->updatedAt = new DateTime();
    }
}