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.
This commit is contained in:
Khafid Prayoga
2025-10-30 12:16:51 +07:00
parent 1dc42be406
commit b073fb60d1
3 changed files with 8 additions and 0 deletions
+3
View File
@@ -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 {
+2
View File
@@ -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 {
+3
View File
@@ -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 {