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