96 lines
1.6 KiB
PHP
96 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\RuleRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* @ORM\Entity(repositoryClass=RuleRepository::class)
|
|
*/
|
|
class Rule
|
|
{
|
|
const TYPE_RESOURCE_RULE = 0;
|
|
const TYPE_GROUP_RULE = 1;
|
|
|
|
/**
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue
|
|
* @ORM\Column(type="integer")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=255, nullable=true)
|
|
*/
|
|
private $predicate;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=255)
|
|
*/
|
|
private $action;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=255, nullable=true)
|
|
*/
|
|
private $name;
|
|
|
|
/**
|
|
* @ORM\Column(type="smallint")
|
|
*/
|
|
private $type;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getPredicate(): ?string
|
|
{
|
|
return $this->predicate;
|
|
}
|
|
|
|
public function setPredicate(?string $predicate): self
|
|
{
|
|
$this->predicate = $predicate;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getAction(): ?string
|
|
{
|
|
return $this->action;
|
|
}
|
|
|
|
public function setAction(string $action): self
|
|
{
|
|
$this->action = $action;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getName(): ?string
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function setName(?string $name): self
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getType(): ?int
|
|
{
|
|
return $this->type;
|
|
}
|
|
|
|
public function setType(int $type): self
|
|
{
|
|
$this->type = $type;
|
|
|
|
return $this;
|
|
}
|
|
}
|