-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #508 from chaynHQ/develop
Merge Develop onto Main
- Loading branch information
Showing
7 changed files
with
71 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Column, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'; | ||
import { FEEDBACK_TAGS_ENUM } from '../utils/constants'; | ||
import { BaseBloomEntity } from './base.entity'; | ||
import { SessionEntity } from './session.entity'; | ||
|
||
@Entity({ name: 'session_feedback' }) | ||
export class SessionFeedbackEntity extends BaseBloomEntity { | ||
@PrimaryGeneratedColumn('uuid', { name: 'sessionFeedbackId' }) | ||
sessionFeedbackId: string; | ||
|
||
@Column() | ||
sessionId: string; | ||
@ManyToOne(() => SessionEntity, (sessionEntity) => sessionEntity.sessionUser, { | ||
onDelete: 'CASCADE', | ||
}) | ||
@JoinTable({ name: 'session', joinColumn: { name: 'sessionId' } }) | ||
session: SessionEntity; | ||
|
||
@Column() | ||
feedbackTags: FEEDBACK_TAGS_ENUM; | ||
|
||
@Column() | ||
feedbackDescription: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
||
export class BloomBackend1719668310816 implements MigrationInterface { | ||
name = 'BloomBackend1719668310816' | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`CREATE TABLE "session_feedback" ("createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "sessionFeedbackId" uuid NOT NULL DEFAULT uuid_generate_v4(), "sessionId" uuid NOT NULL, "feedbackTags" character varying NOT NULL, "feedbackDescription" character varying NOT NULL, CONSTRAINT "PK_fa9bf9afa42e7a30230cf243090" PRIMARY KEY ("sessionFeedbackId"))`); | ||
await queryRunner.query(`ALTER TABLE "session_feedback" ADD CONSTRAINT "FK_a0567dbf6bd30cf4bd05b110a17" FOREIGN KEY ("sessionId") REFERENCES "session"("sessionId") ON DELETE CASCADE ON UPDATE NO ACTION`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "session_feedback" DROP CONSTRAINT "FK_a0567dbf6bd30cf4bd05b110a17"`); | ||
await queryRunner.query(`DROP TABLE "session_feedback"`); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters