feat (models): define employee and user data models

This commit is contained in:
Abizrh
2025-08-31 17:35:13 +07:00
parent 8f2623b15e
commit 1631a85204
2 changed files with 56 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
export interface Employee {
name: string
number: string
status_code: string
user_id: number
person_id: number
position_code: string
division_code: string
}
export interface CreateDto extends Employee {}
export interface UpdateDto extends Employee {
id: number
}
export interface DeleteDto {
id: number
}
export interface GetListDto extends Employee {
id: number
createdAt: string
updatedAt: string
}
export function genEmployee(): Employee {
return {
name: '',
number: '',
status_code: '',
user_id: 0,
person_id: 0,
position_code: '',
division_code: '',
}
}
+19
View File
@@ -0,0 +1,19 @@
export interface User {
id: number
name: string
password: string
status_code: string
createdAt: string
updatedAt: string
}
export function genUser(): User {
return {
id: 0,
name: '',
password: '',
status_code: '',
createdAt: '',
updatedAt: '',
}
}