diff --git a/server/entities/teamComment.ts b/server/entities/teamComment.ts new file mode 100644 index 000000000..0453fa2a2 --- /dev/null +++ b/server/entities/teamComment.ts @@ -0,0 +1,21 @@ +import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from 'typeorm'; + +import type { TeamCommentInterface, TeamCommentType } from '../../types/teamComment.type'; + +@Entity() +export class TeamComment implements TeamCommentInterface { + @PrimaryGeneratedColumn() + public id: number; + + @Column({ type: 'tinyint' }) + type: TeamCommentType; + + @CreateDateColumn() + public createDate: Date; + + @UpdateDateColumn() + public updateDate: Date; + + @Column({ type: 'text' }) + public text: string; +} diff --git a/types/teamComment.type.ts b/types/teamComment.type.ts new file mode 100644 index 000000000..7cf8e01b9 --- /dev/null +++ b/types/teamComment.type.ts @@ -0,0 +1,13 @@ +export interface TeamCommentInterface { + id: number; + type: number; + createDate?: Date | string; + updateDate?: Date | string; + text: string; +} + +export enum TeamCommentType { + DASHBOARD_GLOBAL = 0, + DASHBOARD_VILLAGE = 1, + DASHBOARD_COUNTRY = 2, +}