feat: add medical test entities
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import { Test } from '@/modules/tests/entities/test.entity';
|
||||
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
@Entity()
|
||||
export class ResultRange {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@ManyToOne(() => Test, (test) => test.resultRanges, {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
test: Test;
|
||||
|
||||
@Column({
|
||||
type: 'int',
|
||||
nullable: false,
|
||||
})
|
||||
minScore: number;
|
||||
|
||||
@Column({
|
||||
type: 'int',
|
||||
nullable: false,
|
||||
})
|
||||
maxScore: number;
|
||||
|
||||
@Column({
|
||||
type: 'varchar',
|
||||
length: 255,
|
||||
nullable: false,
|
||||
})
|
||||
title: string;
|
||||
|
||||
@Column({
|
||||
type: 'text',
|
||||
nullable: false,
|
||||
})
|
||||
description: string;
|
||||
}
|
||||
Reference in New Issue
Block a user