refactor: changed the project structure

This commit is contained in:
2026-07-28 20:17:25 +03:30
parent e462606416
commit 2cfda9ca45
65 changed files with 28 additions and 32 deletions
@@ -0,0 +1,19 @@
import { BaseEntity } from "src/common/entities/base.entity";
import { Column, Entity, JoinColumn, ManyToOne, OneToOne } from "typeorm";
import { Reply } from "./reply.entity";
import { Attachment } from "src/modules/attachment/entities/attachment.entity";
@Entity('reply_attachments')
export class ReplyAttachment extends BaseEntity {
@ManyToOne(() => Reply, (rp) => rp.attachments, {
onDelete: 'CASCADE'
})
reply: Reply;
@OneToOne(() => Attachment, (attch) => attch.reply, {
cascade: true,
onDelete: 'CASCADE'
})
@JoinColumn()
attachment: Attachment;
}