refactor: change relationship
This commit is contained in:
parent
0bd3ce55a7
commit
2ed718ccd0
3 changed files with 14 additions and 4 deletions
|
|
@ -323,6 +323,9 @@ export class EmployeeController extends Controller {
|
|||
async getById(@Path() employeeId: string) {
|
||||
const record = await prisma.employee.findFirst({
|
||||
include: {
|
||||
employeeWork: true,
|
||||
employeeCheckup: true,
|
||||
employeeOtherInfo: true,
|
||||
province: true,
|
||||
district: true,
|
||||
subDistrict: true,
|
||||
|
|
@ -669,8 +672,7 @@ export class EmployeeController extends Controller {
|
|||
: undefined,
|
||||
employeeOtherInfo: employeeOtherInfo
|
||||
? {
|
||||
deleteMany: {},
|
||||
create: employeeOtherInfo,
|
||||
update: employeeOtherInfo,
|
||||
}
|
||||
: undefined,
|
||||
province: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue