chore: contact us module

This commit is contained in:
Matin
2025-02-04 14:05:37 +03:30
parent c12e0fb4d4
commit 5e9561b417
7 changed files with 34 additions and 64 deletions
@@ -1,7 +1,6 @@
import { Column, Entity, ManyToOne } from "typeorm";
import { Column, Entity } from "typeorm";
import { BaseEntity } from "../../../common/entities/base.entity";
import { User } from "../../users/entities/user.entity";
@Entity()
export class ContactUs extends BaseEntity {
@@ -11,12 +10,15 @@ export class ContactUs extends BaseEntity {
@Column({ type: "varchar", length: 150, nullable: false })
title: string;
@Column({ type: "varchar", length: 350 })
fullName: string;
@Column({ type: "varchar", length: 150 })
email: 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;
}