copyWithCompanion method
Implementation
EmployeeData copyWithCompanion(EmployeeCompanion data) {
return EmployeeData(
id: data.id.present ? data.id.value : this.id,
empNumber: data.empNumber.present ? data.empNumber.value : this.empNumber,
name: data.name.present ? data.name.value : this.name,
email: data.email.present ? data.email.value : this.email,
employeePositionId: data.employeePositionId.present
? data.employeePositionId.value
: this.employeePositionId,
departmentId: data.departmentId.present
? data.departmentId.value
: this.departmentId,
birthday: data.birthday.present ? data.birthday.value : this.birthday,
hireDate: data.hireDate.present ? data.hireDate.value : this.hireDate,
imagePath: data.imagePath.present ? data.imagePath.value : this.imagePath,
address: data.address.present ? data.address.value : this.address,
);
}