2022-01-16 16:04:56 +00:00
< ? php
declare ( strict_types = 1 );
namespace Plugin\PinnedNotes\Entity ;
use App\Core\Entity ;
class PinnedNotes extends Entity
{
private int $id ;
private int $actor_id ;
private int $note_id ;
public function getId ()
{
return $this -> id ;
}
2022-10-19 22:39:17 +01:00
public function setId ( int $id ) : self
2022-01-16 16:04:56 +00:00
{
$this -> id = $id ;
return $this ;
}
public function getActorId ()
{
return $this -> actor_id ;
}
2022-10-19 22:39:17 +01:00
public function setActorId ( int $actor_id ) : self
2022-01-16 16:04:56 +00:00
{
$this -> actor_id = $actor_id ;
return $this ;
}
public function getNoteId ()
{
return $this -> note_id ;
}
2022-10-19 22:39:17 +01:00
public function setNoteId ( int $note_id ) : self
2022-01-16 16:04:56 +00:00
{
$this -> note_id = $note_id ;
return $this ;
}
2022-03-08 00:21:12 +00:00
public static function schemaDef () : array
2022-01-16 16:04:56 +00:00
{
return [
'name' => 'pinned_notes' ,
'fields' => [
'id' => [ 'type' => 'serial' , 'not null' => true , 'description' => 'unique identifier' ],
'actor_id' => [ 'type' => 'int' , 'not null' => true , 'foreign key' => true , 'target' => 'Actor.id' , 'multiplicity' => 'many to one' , 'description' => 'Actor who pinned the note' ],
'note_id' => [ 'type' => 'int' , 'not null' => true , 'foreign key' => true , 'target' => 'Note.id' , 'multiplicity' => 'many to one' , 'description' => 'Pinned note' ],
],
'primary key' => [ 'id' ],
];
}
}