src/Entity/WorkflowProcessLog.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\WorkflowProcessLogRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Tionvel\WorkflowBundle\Entity\WorkflowProcess;
  6. #[ORM\Entity(repositoryClass: WorkflowProcessLogRepository::class)]
  7. class WorkflowProcessLog
  8. {
  9. #[ORM\Id]
  10. #[ORM\GeneratedValue]
  11. #[ORM\Column]
  12. private ?int $id = null;
  13. #[ORM\Column(length: 255, nullable: true)]
  14. private ?string $action = null;
  15. #[ORM\Column(nullable: true)]
  16. private array $old_data = [];
  17. #[ORM\Column(nullable: true)]
  18. private array $data = [];
  19. #[ORM\Column(length: 255)]
  20. private ?string $username = null;
  21. #[ORM\ManyToOne(targetEntity:"Tionvel\WorkflowBundle\Entity\WorkflowProcess", inversedBy: "workflow_process_log" ,fetch:"EAGER")]
  22. #[ORM\JoinColumn(name: "process_id", referencedColumnName: "id", onDelete: "SET NULL")]
  23. private WorkflowProcess $process;
  24. #[ORM\Column]
  25. private ?\DateTimeImmutable $created_at = null;
  26. public function getId(): ?int
  27. {
  28. return $this->id;
  29. }
  30. public function getAction(): ?string
  31. {
  32. return $this->action;
  33. }
  34. public function setAction(?string $action): self
  35. {
  36. $this->action = $action;
  37. return $this;
  38. }
  39. public function getOldData(): array
  40. {
  41. return $this->old_data;
  42. }
  43. public function setOldData(?array $old_data): self
  44. {
  45. $this->old_data = $old_data;
  46. return $this;
  47. }
  48. public function getData(): array
  49. {
  50. return $this->data;
  51. }
  52. public function setData(?array $data): self
  53. {
  54. $this->data = $data;
  55. return $this;
  56. }
  57. public function getUsername(): ?string
  58. {
  59. return $this->username;
  60. }
  61. public function setUsername(string $username): self
  62. {
  63. $this->username = $username;
  64. return $this;
  65. }
  66. public function getCreatedAt(): ?\DateTimeImmutable
  67. {
  68. return $this->created_at;
  69. }
  70. public function setCreatedAt(\DateTimeImmutable $created_at): self
  71. {
  72. $this->created_at = $created_at;
  73. return $this;
  74. }
  75. /**
  76. * @return WorkflowProcess
  77. */
  78. public function getProcess(): WorkflowProcess
  79. {
  80. return $this->process;
  81. }
  82. /**
  83. * @param WorkflowProcess $process
  84. */
  85. public function setProcess(WorkflowProcess $process): void
  86. {
  87. $this->process = $process;
  88. }
  89. }