From b073fb60d12b9a7f1e77d01fe74a815a7dfa516b Mon Sep 17 00:00:00 2001 From: Khafid Prayoga Date: Thu, 30 Oct 2025 12:16:51 +0700 Subject: [PATCH] feat(models): add employee relation to position interfaces Add optional Employee type to specialist, installation and subspecialist position interfaces to support employee relation in the data model. --- app/models/installation-position.ts | 3 +++ app/models/specialist-position.ts | 2 ++ app/models/subspecialist-position.ts | 3 +++ 3 files changed, 8 insertions(+) diff --git a/app/models/installation-position.ts b/app/models/installation-position.ts index aa0a9ebf..199038d7 100644 --- a/app/models/installation-position.ts +++ b/app/models/installation-position.ts @@ -1,4 +1,5 @@ import { type Base, genBase } from './_base' +import type { Employee } from './employee' export interface InstallationPosition extends Base { installation_id: number @@ -6,6 +7,8 @@ export interface InstallationPosition extends Base { name: string headStatus?: boolean employee_id?: number + + employee?: Employee | null } export function genInstallationPosition(): InstallationPosition { diff --git a/app/models/specialist-position.ts b/app/models/specialist-position.ts index 58c53f9e..727e8374 100644 --- a/app/models/specialist-position.ts +++ b/app/models/specialist-position.ts @@ -1,4 +1,5 @@ import { type Base, genBase } from './_base' +import type { Employee } from './employee' export interface SpecialistPosition extends Base { specialist_id: number @@ -6,6 +7,7 @@ export interface SpecialistPosition extends Base { name: string headStatus?: boolean employee_id?: number + employee?: Employee | null } export function genSpecialistPosition(): SpecialistPosition { diff --git a/app/models/subspecialist-position.ts b/app/models/subspecialist-position.ts index 5fdfa639..660bd71b 100644 --- a/app/models/subspecialist-position.ts +++ b/app/models/subspecialist-position.ts @@ -1,4 +1,5 @@ import { type Base, genBase } from './_base' +import type { Employee } from './employee' export interface SubSpecialistPosition extends Base { subspecialist_id: number @@ -6,6 +7,8 @@ export interface SubSpecialistPosition extends Base { name: string headStatus?: boolean employee_id?: number + + employee?: Employee | null } export function genSubSpecialistPosition(): SubSpecialistPosition {