update:fare type done

This commit is contained in:
wayanrivan
2026-03-25 14:00:50 +07:00
parent ad965987ce
commit 65b9ba9454
3 changed files with 44 additions and 0 deletions

38
src/entity/faretype.ts Normal file
View 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;
}

View File

@ -11,6 +11,7 @@ import {
import { ServiceClass } from './service_class';
import { Service } from './service';
import { FareType } from './faretype';
@Entity('service_fares')
export class ServiceFare {
@ -21,6 +22,10 @@ export class ServiceFare {
@JoinColumn()
serviceClass: ServiceClass;
@ManyToOne(() => FareType, { onDelete: 'NO ACTION' })
@JoinColumn()
faretype: FareType;
@ManyToOne(() => Service, { onDelete: 'NO ACTION' })
@JoinColumn()
service: Service;

View File

@ -37,6 +37,7 @@ export * from "../entity/patient_guarantor"
export * from "../entity/user_to_room"
export * from "../entity/refferal_hospital"
export * from "../entity/room_to_pharmacy"
export * from "../entity/faretype"
export * from "../types/action";
export * from "../types/error";