chore: refactor the announcement module and service and add queue

This commit is contained in:
mahyargdz
2025-03-04 10:51:16 +03:30
parent e234f98998
commit bf991914e4
9 changed files with 265 additions and 105 deletions
@@ -16,7 +16,7 @@ export class Announcement extends BaseEntity {
@Column({ type: "timestamp", nullable: true, default: null })
publishAt: Date | null;
@ManyToOne(() => DanakService, (service) => service.announcements, { eager: true, onDelete: "CASCADE" })
@ManyToOne(() => DanakService, (service) => service.announcements, { onDelete: "CASCADE" })
targetService: DanakService;
@Column({ type: "boolean", default: false })
@@ -27,8 +27,4 @@ export class Announcement extends BaseEntity {
@Column({ type: "boolean", default: false })
isPublic: boolean;
isPublicAnnouncement(): boolean {
return this.isPublic;
}
}