2021-12-24 00:38:06 +00:00
< ? php
2021-12-26 09:48:16 +00:00
declare ( strict_types = 1 );
2021-12-24 00:38:06 +00:00
namespace Plugin\AttachmentCollections\Entity ;
use App\Core\Entity ;
2021-12-26 09:48:16 +00:00
2021-12-28 04:39:09 +00:00
class AttachmentCollectionEntry extends Entity
2021-12-24 00:38:06 +00:00
{
// These tags are meant to be literally included and will be populated with the appropriate fields, setters and getters by `bin/generate_entity_fields`
// {{{ Autocode
// @codeCoverageIgnoreStart
private int $id ;
2021-12-28 04:39:09 +00:00
private int $note_id ;
2021-12-24 00:38:06 +00:00
private int $attachment_id ;
2022-02-05 16:15:34 +00:00
private int $attachment_collection_id ;
2021-12-24 00:38:06 +00:00
public function setId ( int $id ) : self
{
$this -> id = $id ;
return $this ;
}
public function getId () : int
{
return $this -> id ;
}
2021-12-28 04:39:09 +00:00
public function setNoteId ( int $note_id ) : self
{
$this -> note_id = $note_id ;
return $this ;
}
public function getNoteId () : int
{
return $this -> note_id ;
}
2021-12-24 00:38:06 +00:00
public function setAttachmentId ( int $attachment_id ) : self
{
$this -> attachment_id = $attachment_id ;
return $this ;
}
public function getAttachmentId () : int
{
return $this -> attachment_id ;
}
2022-02-05 16:15:34 +00:00
public function setAttachmentCollectionId ( int $attachment_collection_id ) : self
2021-12-24 00:38:06 +00:00
{
2022-02-05 16:15:34 +00:00
$this -> attachment_collection_id = $attachment_collection_id ;
2021-12-24 00:38:06 +00:00
return $this ;
}
2022-02-05 16:15:34 +00:00
public function getAttachmentCollectionId () : int
2021-12-24 00:38:06 +00:00
{
2022-02-05 16:15:34 +00:00
return $this -> attachment_collection_id ;
2021-12-24 00:38:06 +00:00
}
// @codeCoverageIgnoreEnd
// }}} Autocode
2022-03-08 00:21:12 +00:00
public static function schemaDef () : array
2021-12-24 00:38:06 +00:00
{
return [
2021-12-28 04:39:09 +00:00
'name' => 'attachment_collection_entry' ,
2021-12-24 00:38:06 +00:00
'fields' => [
2022-02-05 16:15:34 +00:00
'id' => [ 'type' => 'serial' , 'not null' => true , 'description' => 'unique identifier' ],
'note_id' => [ 'type' => 'int' , 'foreign key' => true , 'target' => 'Note.id' , 'multiplicity' => 'one to one' , 'not null' => true , 'description' => 'foreign key to note table' ],
'attachment_id' => [ 'type' => 'int' , 'foreign key' => true , 'target' => 'Attachment.id' , 'multiplicity' => 'one to one' , 'not null' => true , 'description' => 'foreign key to attachment table' ],
'attachment_collection_id' => [ 'type' => 'int' , 'foreign key' => true , 'target' => 'AttachmentCollection.id' , 'multiplicity' => 'one to one' , 'not null' => true , 'description' => 'foreign key to collection table' ],
2021-12-24 00:38:06 +00:00
],
'primary key' => [ 'id' ],
];
}
}