upd entity service: examination_details
This commit is contained in:
@ -13,6 +13,7 @@ import {
|
|||||||
|
|
||||||
import { ServiceType } from './service_type';
|
import { ServiceType } from './service_type';
|
||||||
import { Room } from './room';
|
import { Room } from './room';
|
||||||
|
import { ExaminationDetail } from './examination_detail';
|
||||||
|
|
||||||
@Entity('services')
|
@Entity('services')
|
||||||
export class Service {
|
export class Service {
|
||||||
@ -29,17 +30,25 @@ export class Service {
|
|||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
serviceType: ServiceType;
|
serviceType: ServiceType;
|
||||||
|
|
||||||
@ManyToMany(() => Room, (room) => room.services)
|
@ManyToMany(() => Room, (room) => room.services)
|
||||||
@JoinTable({
|
@JoinTable({
|
||||||
name: 'service_rooms',
|
name: 'service_rooms',
|
||||||
joinColumn: { name: 'service_id', referencedColumnName: 'id' },
|
joinColumn: { name: 'service_id', referencedColumnName: 'id' },
|
||||||
inverseJoinColumn: { name: 'room_id', referencedColumnName: 'id' },
|
inverseJoinColumn: { name: 'room_id', referencedColumnName: 'id' },
|
||||||
})
|
})
|
||||||
rooms: Room[];
|
rooms: Room[];
|
||||||
|
|
||||||
@Column()
|
@ManyToMany(() => ExaminationDetail, { onDelete: 'NO ACTION' })
|
||||||
@CreateDateColumn()
|
@JoinTable({
|
||||||
created_at: Date;
|
name: 'service_examinations',
|
||||||
|
joinColumn: { name: 'service_id', referencedColumnName: 'id' },
|
||||||
|
inverseJoinColumn: { name: 'examination_detail_id', referencedColumnName: 'id' },
|
||||||
|
})
|
||||||
|
examination_details: ExaminationDetail[];
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
@Column({ nullable: true, length: 256 })
|
||||||
created_by: string;
|
created_by: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user