mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-31 20:13:49 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -13,42 +13,30 @@ namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="chill_main_cronjob_execution")
|
||||
*/
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'chill_main_cronjob_execution')]
|
||||
class CronJobExecution
|
||||
{
|
||||
final public const FAILURE = 100;
|
||||
|
||||
final public const SUCCESS = 1;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true, options: ['default' => null])]
|
||||
private ?\DateTimeImmutable $lastEnd = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=false)
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: false)]
|
||||
private \DateTimeImmutable $lastStart;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="integer", nullable=true, options={"default": null})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
|
||||
private ?int $lastStatus = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json", options={"default": "'{}'::jsonb", "jsonb": true})
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON, options: ['default' => "'{}'::jsonb", 'jsonb' => true])]
|
||||
private array $lastExecutionData = [];
|
||||
|
||||
public function __construct(/**
|
||||
* @ORM\Column(type="text", nullable=false)
|
||||
*
|
||||
* @ORM\Id
|
||||
*/
|
||||
public function __construct(
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false)]
|
||||
#[ORM\Id]
|
||||
private string $key
|
||||
) {
|
||||
$this->lastStart = new \DateTimeImmutable('now');
|
||||
|
Reference in New Issue
Block a user