feat: create type for Master Employee

This commit is contained in:
ValdiANS
2026-01-08 09:41:24 +07:00
parent f17bc1493b
commit 21acb09f0c
+21
View File
@@ -0,0 +1,21 @@
import { BaseMetadata } from '@/types/api/api-general';
import { BaseLocation } from '@/types/api/master-data/location';
import { BaseUser } from '@/types/api/user';
import { BaseKandang } from '@/types/api/master-data/kandang';
export type BaseEmployee = {
id: number;
name: string;
is_active: boolean;
kandangs: Pick<BaseKandang, 'id' | 'name' | 'status' | 'capacity'>[];
};
export type Employee = BaseMetadata & BaseEmployee;
export type CreateEmployeePayload = {
name: string;
is_active: boolean;
kandang_ids: number[];
};
export type UpdateEmployeePayload = CreateEmployeePayload;