chore: contact us module

This commit is contained in:
Matin
2025-02-04 11:41:15 +03:30
parent 957178261e
commit c12e0fb4d4
11 changed files with 259 additions and 1 deletions
@@ -0,0 +1,22 @@
import { Column, Entity, ManyToOne } from "typeorm";
import { BaseEntity } from "../../../common/entities/base.entity";
import { User } from "../../users/entities/user.entity";
@Entity()
export class ContactUs extends BaseEntity {
@Column({ type: "int", generated: "identity", insert: false })
numericId: number;
@Column({ type: "varchar", length: 150, nullable: false })
title: string;
@Column({ type: "text", nullable: false })
content: string;
@ManyToOne(() => User, (user) => user.contactUs, { nullable: false, onDelete: "CASCADE" })
user: User;
@Column({ type: "boolean", default: false })
isRead: boolean;
}