update:fare type done
This commit is contained in:
38
src/entity/faretype.ts
Normal file
38
src/entity/faretype.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import {
|
||||||
|
Entity,
|
||||||
|
PrimaryGeneratedColumn,
|
||||||
|
Column,
|
||||||
|
CreateDateColumn,
|
||||||
|
UpdateDateColumn,
|
||||||
|
DeleteDateColumn,
|
||||||
|
} from 'typeorm';
|
||||||
|
|
||||||
|
@Entity('fare_type')
|
||||||
|
export class FareType {
|
||||||
|
@PrimaryGeneratedColumn('uuid')
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
type: 'text',
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
created_by: string;
|
||||||
|
|
||||||
|
@UpdateDateColumn({ nullable: true })
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
updated_by: string;
|
||||||
|
|
||||||
|
@DeleteDateColumn({ nullable: true })
|
||||||
|
deleted_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true, length: 256 })
|
||||||
|
deleted_by: string;
|
||||||
|
}
|
||||||
@ -11,6 +11,7 @@ import {
|
|||||||
|
|
||||||
import { ServiceClass } from './service_class';
|
import { ServiceClass } from './service_class';
|
||||||
import { Service } from './service';
|
import { Service } from './service';
|
||||||
|
import { FareType } from './faretype';
|
||||||
|
|
||||||
@Entity('service_fares')
|
@Entity('service_fares')
|
||||||
export class ServiceFare {
|
export class ServiceFare {
|
||||||
@ -21,6 +22,10 @@ export class ServiceFare {
|
|||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
serviceClass: ServiceClass;
|
serviceClass: ServiceClass;
|
||||||
|
|
||||||
|
@ManyToOne(() => FareType, { onDelete: 'NO ACTION' })
|
||||||
|
@JoinColumn()
|
||||||
|
faretype: FareType;
|
||||||
|
|
||||||
@ManyToOne(() => Service, { onDelete: 'NO ACTION' })
|
@ManyToOne(() => Service, { onDelete: 'NO ACTION' })
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
service: Service;
|
service: Service;
|
||||||
|
|||||||
@ -37,6 +37,7 @@ export * from "../entity/patient_guarantor"
|
|||||||
export * from "../entity/user_to_room"
|
export * from "../entity/user_to_room"
|
||||||
export * from "../entity/refferal_hospital"
|
export * from "../entity/refferal_hospital"
|
||||||
export * from "../entity/room_to_pharmacy"
|
export * from "../entity/room_to_pharmacy"
|
||||||
|
export * from "../entity/faretype"
|
||||||
|
|
||||||
export * from "../types/action";
|
export * from "../types/action";
|
||||||
export * from "../types/error";
|
export * from "../types/error";
|
||||||
|
|||||||
Reference in New Issue
Block a user