Skip to content

Commit

Permalink
Added support for doctrine/orm attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
juniwalk committed Jul 29, 2022
1 parent 87ac3aa commit 5d83353
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions src/Entity/Record.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,55 +15,64 @@
/**
* @ORM\MappedSuperclass
*/
#[ORM\MappedSuperclass]
abstract class Record
{
/**
* @ORM\Column(type="string", length=16)
* @var string
*/
protected $type = 'log';
#[ORM\Column(type: "string", length: 16)]
protected string $type = 'log';

/**
* @ORM\Column(type="string", length=64)
* @var string
*/
protected $event;
#[ORM\Column(type: "string", length: 64)]
protected string $event;

/**
* @ORM\Column(type="string")
* @var string|null
*/
protected $message;
#[ORM\Column(type: "string")]
protected ?string $message;

/**
* @ORM\Column(type="datetimetz")
* @var DateTime
*/
protected $date;
#[ORM\Column(type: "datetimetz")]
protected DateTime $date;

/**
* @ORM\Column(type="string", length=16)
* @var string
*/
protected $level = 'secondary';
#[ORM\Column(type: "string", length: 16)]
protected string $level = 'secondary';

/**
* @ORM\Column(type="boolean")
* @var bool
*/
protected $isFinished = false;
#[ORM\Column(type: "boolean")]
protected bool $isFinished = false;

/**
* @ORM\Column(type="json", nullable=true)
* @var string[]
*/
protected $params;
#[ORM\Column(type: "json", nullable: true)]
protected ?array $params;

/**
* @ORM\Column(type="text", nullable=true)
* @var string|null
*/
protected $note;
#[ORM\Column(type: "text", nullable: true)]
protected ?string $note;


/**
Expand Down

0 comments on commit 5d83353

Please sign in to comment.