<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="user_worksheet")
 */
class UserWorksheet
{
    /**
     * @ORM\Id
     * @ORM\Column(type="uuid", unique=true)
     * @ORM\GeneratedValue(strategy="CUSTOM")
     * @ORM\CustomIdGenerator(class="Ramsey\Uuid\Doctrine\UuidGenerator")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="User", inversedBy="worksheets")
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="SET NULL")
     */
    protected $user;

    /**
     * @ORM\OneToMany(targetEntity="UserWorksheetTask", mappedBy="userWorksheet", cascade={"persist", "remove"})
     */
    protected $userWorkSheetTasks;

    /**
     * @ORM\Column(type="smallint", nullable=false, options={"unsigned" = true})
     */
    protected $dinNumber;

    /**
     * @ORM\Column(type="string", nullable=false)
     */
    protected $dinAssetName;

    /**
     * @ORM\Column(type="string", nullable=true)
     */
    protected $failureProbability;

    /**
     * @ORM\Column(type="string", nullable=true)
     */
    protected $failureDamage;

    /**
     * @ORM\Column(type="boolean", nullable=true)
     */
    protected $maintenanceAdvantage;

    /**
     * @ORM\Column(type="boolean", nullable=true)
     */
    protected $inspectionAdvantage;

    /**
     * @ORM\Column(type="smallint", nullable=true, options={"unsigned" = true})
     */
    protected $userCycleMonths;

    /**
     * @ORM\Column(type="string", nullable=true)
     */
    protected $bandwidth;

    /**
     * @ORM\Column(type="smallint", nullable=true, options={"unsigned" = true})
     */
    protected $recMaintenanceCycleMonths;

    /**
     * @ORM\Column(type="smallint", nullable=true, options={"unsigned" = true})
     */
    protected $recInspectionCycleMonths;

    /**
     * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
     */
    protected $deviationCosts;

    /**
     * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
     */
    protected $deviationPercentage;

    /**
     * @ORM\Column(type="datetime", nullable=false)
     */
    protected $creationDate;


    public function __construct(User $user)
    {
        $this->user = $user;
        $this->creationDate = new \DateTime('now', new \DateTimeZone('Europe/Berlin'));
    }

    /**
     * @return mixed
     */
    public function getId()
    {
        return $this->id;
    }

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

    /**
     * @param mixed $user
     */
    public function setUser($user): void
    {
        $this->user = $user;
    }

    /**
     * @return mixed
     */
    public function getDinNumber()
    {
        return $this->dinNumber;
    }

    /**
     * @param mixed $dinNumber
     */
    public function setDinNumber($dinNumber): void
    {
        $this->dinNumber = $dinNumber;
    }

    /**
     * @return mixed
     */
    public function getDinAssetName()
    {
        return $this->dinAssetName;
    }

    /**
     * @param mixed $dinAssetName
     */
    public function setDinAssetName($dinAssetName): void
    {
        $this->dinAssetName = $dinAssetName;
    }

    /**
     * @return mixed
     */
    public function getFailureProbability()
    {
        return $this->failureProbability;
    }

    /**
     * @param mixed $failureProbability
     */
    public function setFailureProbability($failureProbability): void
    {
        $this->failureProbability = $failureProbability;
    }

    /**
     * @return mixed
     */
    public function getFailureDamage()
    {
        return $this->failureDamage;
    }

    /**
     * @param mixed $failureDamage
     */
    public function setFailureDamage($failureDamage): void
    {
        $this->failureDamage = $failureDamage;
    }

    /**
     * @return mixed
     */
    public function getMaintenanceAdvantage()
    {
        return $this->maintenanceAdvantage;
    }

    /**
     * @param mixed $maintenanceAdvantage
     */
    public function setMaintenanceAdvantage($maintenanceAdvantage): void
    {
        $this->maintenanceAdvantage = $maintenanceAdvantage;
    }

    /**
     * @return mixed
     */
    public function getInspectionAdvantage()
    {
        return $this->inspectionAdvantage;
    }

    /**
     * @param mixed $inspectionAdvantage
     */
    public function setInspectionAdvantage($inspectionAdvantage): void
    {
        $this->inspectionAdvantage = $inspectionAdvantage;
    }

    /**
     * @return mixed
     */
    public function getUserCycleMonths()
    {
        return $this->userCycleMonths;
    }

    /**
     * @param mixed $userCycleMonths
     */
    public function setUserCycleMonths($userCycleMonths): void
    {
        $this->userCycleMonths = $userCycleMonths;
    }

    /**
     * @return mixed
     */
    public function getBandwidth()
    {
        return $this->bandwidth;
    }

    /**
     * @param mixed $bandwidth
     */
    public function setBandwidth($bandwidth): void
    {
        $this->bandwidth = $bandwidth;
    }

    /**
     * @return mixed
     */
    public function getRecMaintenanceCycleMonths()
    {
        return $this->recMaintenanceCycleMonths;
    }

    /**
     * @param mixed $recMaintenanceCycleMonths
     */
    public function setRecMaintenanceCycleMonths($recMaintenanceCycleMonths): void
    {
        $this->recMaintenanceCycleMonths = $recMaintenanceCycleMonths;
    }

    /**
     * @return mixed
     */
    public function getRecInspectionCycleMonths()
    {
        return $this->recInspectionCycleMonths;
    }

    /**
     * @param mixed $recInspectionCycleMonths
     */
    public function setRecInspectionCycleMonths($recInspectionCycleMonths): void
    {
        $this->recInspectionCycleMonths = $recInspectionCycleMonths;
    }

    /**
     * @return mixed
     */
    public function getDeviationCosts()
    {
        return $this->deviationCosts;
    }

    /**
     * @param mixed $deviationCosts
     */
    public function setDeviationCosts($deviationCosts): void
    {
        $this->deviationCosts = $deviationCosts;
    }

    /**
     * @return mixed
     */
    public function getDeviationPercentage()
    {
        return $this->deviationPercentage;
    }

    /**
     * @param mixed $deviationPercentage
     */
    public function setDeviationPercentage($deviationPercentage): void
    {
        $this->deviationPercentage = $deviationPercentage;
    }

    /**
     * @return \DateTime
     */
    public function getCreationDate(): \DateTime
    {
        return $this->creationDate;
    }

    /**
     * @return mixed
     */
    public function getUserWorkSheetTasks()
    {
        return $this->userWorkSheetTasks;
    }

    /**
     * @param mixed $userWorkSheetTasks
     */
    public function setUserWorkSheetTasks($userWorkSheetTasks): void
    {
        $this->userWorkSheetTasks = $userWorkSheetTasks;
    }



}
