✨ feat (models): define employee and user data models
This commit is contained in:
No files matched your search
@@ -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: '',
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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: '',
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user