Skip to content

Commit

Permalink
add teamComment and typeCommentType
Browse files Browse the repository at this point in the history
  • Loading branch information
SimNed committed Sep 9, 2024
1 parent 02c90bd commit 4473428
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
21 changes: 21 additions & 0 deletions server/entities/teamComment.ts
Original file line number Diff line number Diff line change
@@ -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;
}
13 changes: 13 additions & 0 deletions types/teamComment.type.ts
Original file line number Diff line number Diff line change
@@ -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,
}

0 comments on commit 4473428

Please sign in to comment.