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,26 @@
import { Attachment } from "src/modules/attachment/entities/attachment.entity";
import { BaseEntity } from "src/common/entities/base.entity";
import { Complaint } from "src/modules/complaint/entities/complaint.entity";
import { User } from "src/modules/users/entities/user.entity";
import { Column, Entity, ManyToOne, OneToMany } from "typeorm";
import { ReplyAttachment } from "./reply-attachment.entity";
@Entity('replies')
export class Reply extends BaseEntity {
@Column({
type: 'text'
})
content: string; // the text or message written.
@ManyToOne(() => User)
sender: User;
@ManyToOne(() => User)
receiver: User;
@ManyToOne(() => Complaint, (complaint) => complaint.messages)
complaint: Complaint;
@OneToMany(() => ReplyAttachment, (ra) => ra.reply)
attachments: ReplyAttachment;
}