<?php
namespace App\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*
* @ORM\Table(
* name="general_values_gauges",
* uniqueConstraints={
*
* @ORM\UniqueConstraint(name="gauge_type_measured_at_idx", columns={"gauge_type", "measured_at"})
* }
* )
*/
class GeneralValuesGauge
{
public const GAUGE_TYPE_NUMBER_OF_RECURRENT_JOBS_TOTAL = 0;
public const GAUGE_TYPE_NUMBER_OF_JOBSEEKERS_TOTAL = 1;
public const GAUGE_TYPE_NUMBER_OF_JOBOFFERERS_TOTAL = 2;
public const GAUGE_TYPE_NUMBER_OF_RECURRENT_JOBS_FROM_A_FEED_IN_EBAY_FEED = 18;
public const GAUGE_TYPE_NUMBER_OF_RECURRENT_JOBS_FROM_B_FEED_IN_EBAY_FEED = 19;
public const GAUGE_TYPE_NUMBER_OF_RECURRENT_JOBS_FROM_C_FEED_IN_EBAY_FEED = 20;
// ! GENERAL VALUE GAUGE TYPES ARE ALSO DEFINED IN contentDistributorFeed->generalValueGaugeType. Please avoid double usage by checking there first.
// A FULL DOC CAN BE FOUND HERE: https://go-gastro.atlassian.net/wiki/spaces/JOB/pages/2341404677/General+Values+Gauges PLEASE ADD THE ONES YOU CREATED HERE
public const POSSIBLE_GENERAL_VALUES_GAUGE_TYPES = [
self::GAUGE_TYPE_NUMBER_OF_RECURRENT_JOBS_TOTAL,
self::GAUGE_TYPE_NUMBER_OF_JOBSEEKERS_TOTAL,
self::GAUGE_TYPE_NUMBER_OF_JOBOFFERERS_TOTAL,
self::GAUGE_TYPE_NUMBER_OF_RECURRENT_JOBS_FROM_A_FEED_IN_EBAY_FEED,
self::GAUGE_TYPE_NUMBER_OF_RECURRENT_JOBS_FROM_B_FEED_IN_EBAY_FEED,
self::GAUGE_TYPE_NUMBER_OF_RECURRENT_JOBS_FROM_C_FEED_IN_EBAY_FEED
];
public function __construct(
int $gaugeType,
DateTime $measuredAt,
int $value
) {
$this->gaugeType = $gaugeType;
$this->measuredAt = $measuredAt;
$this->value = $value;
}
/**
* @ORM\GeneratedValue(strategy="CUSTOM")
*
* @ORM\CustomIdGenerator(class="App\Utility\DatabaseIdGenerator")
*
* @ORM\Column(name="id", type="guid")
*
* @ORM\Id
*/
protected string $id;
/**
* @ORM\Column(name="gauge_type", type="smallint", nullable=false)
*/
private int $gaugeType;
/**
* @ORM\Column(name="measured_at", type="datetime", nullable=false)
*/
private DateTime $measuredAt;
/**
* @ORM\Column(name="value", type="integer", nullable=false)
*/
private int $value;
public function getId(): string
{
return $this->id;
}
public function getGaugeType(): int
{
return $this->gaugeType;
}
public function getMeasuredAt(): DateTime
{
return $this->measuredAt;
}
public function getValue(): int
{
return $this->value;
}
}