chore: contact us module
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user