<?php

namespace App\Classes\Modules\Companies\DataTransferObjects;

use App\Classes\General\Interfaces\DataTransferObject;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Models\CompanyModule;
use App\Models\User;

class EmploymentObject implements DataTransferObject
{
    /** @var CompanyModule */
    private $companyModule;

    /** @var User */
    private $user;

    /** @var int|null */
    private $status;

    /** @var int|null */
    private $roleId;

    /**
     * EmploymentObject constructor.
     * @param CompanyModule $companyModule
     * @param User $user
     * @param int|null $status
     * @param int|null $roleId
     */
    public function __construct(CompanyModule $companyModule, User $user, ?int $status = ApprovalStatus::APPROVED, ?int $roleId = 1)
    {
        $this->companyModule = $companyModule;
        $this->user = $user;
        $this->roleId = $roleId;
        $this->status = $status;
    }

    /**
     * @return CompanyModule
     */
    public function getCompanyModule(): CompanyModule
    {
        return $this->companyModule;
    }

    /**
     * @return User
     */
    public function getUser(): User
    {
        return $this->user;
    }

    /**
     * @return int
     */
    public function getStatus(): int
    {
        return $this->status;
    }

    /**
     * @return int
     */
    public function getRoleId(): int
    {
        return $this->roleId;
    }
}
