|
@@ -38,14 +38,14 @@ use n2n\persistence\orm\attribute\ManyToMany;
|
|
|
'text' => 'news_text'
|
|
'text' => 'news_text'
|
|
|
])] */
|
|
])] */
|
|
|
/* #[MappedSuperclass] */
|
|
/* #[MappedSuperclass] */
|
|
|
-/* #[OneToMany('assignement.assignementGroup', Member::class)]*/
|
|
|
|
|
-/* #[ManyToOne(targetEntity: BlogArticle::class, cascade: null, cascadeType: CascadeType::ALL, fetch: FetchType::EAGER)] */
|
|
|
|
|
/* #[EntityListeners(LastModListener::class)] */
|
|
/* #[EntityListeners(LastModListener::class)] */
|
|
|
/* #[OneToOne(Article::class)] */
|
|
/* #[OneToOne(Article::class)] */
|
|
|
/* #[ManyToMany('articles', Article::class)] */
|
|
/* #[ManyToMany('articles', Article::class)] */
|
|
|
|
|
+/* #[OneToMany('assignement.assignementGroup', Member::class)]*/
|
|
|
|
|
+/* #[ManyToOne(targetEntity: BlogArticle::class, cascade: null, cascadeType: CascadeType::ALL, fetch: FetchType::EAGER)] */
|
|
|
class News extends ObjectAdapter implements \JsonSerializable {
|
|
class News extends ObjectAdapter implements \JsonSerializable {
|
|
|
public int $id;
|
|
public int $id;
|
|
|
- /* #[OrderBy]
|
|
|
|
|
|
|
+ /* #[OrderBy(array('name' => 'ASC'))]
|
|
|
#[Embedded(Address::class)]
|
|
#[Embedded(Address::class)]
|
|
|
#[AttributeOverrides(['forename' => 'bill_forename',
|
|
#[AttributeOverrides(['forename' => 'bill_forename',
|
|
|
'surname' => 'bill_surname'])]
|
|
'surname' => 'bill_surname'])]
|
|
@@ -54,9 +54,15 @@ class News extends ObjectAdapter implements \JsonSerializable {
|
|
|
/* #[ManagedFile(FileManager::TYPE_PUBLIC)] */
|
|
/* #[ManagedFile(FileManager::TYPE_PUBLIC)] */
|
|
|
/* #[AssociationOverrides(array( 'assignementGroup' => new JoinColumn('group_id')))] */
|
|
/* #[AssociationOverrides(array( 'assignementGroup' => new JoinColumn('group_id')))] */
|
|
|
/* #[JoinColumn('article_id')] */
|
|
/* #[JoinColumn('article_id')] */
|
|
|
|
|
+ public string $title;
|
|
|
|
|
+
|
|
|
|
|
+ public string $description;
|
|
|
|
|
+
|
|
|
public string $text;
|
|
public string $text;
|
|
|
|
|
|
|
|
public function jsonSerialize(): mixed {
|
|
public function jsonSerialize(): mixed {
|
|
|
- // TODO: Implement jsonSerialize() method.
|
|
|
|
|
|
|
+ return ['title' => $this->title,
|
|
|
|
|
+ 'description' => $this->description,
|
|
|
|
|
+ 'text' => $this->text ];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|