29 lines
1.1 KiB
C#

using Marco.Pms.Model.AttendanceModule;
using Marco.Pms.Model.ViewModels.AttendanceVM;
namespace Marco.Pms.Model.Mapper
{
public static class AttendanceMapper
{
public static AttendanceLogVM ToAttendanceLogVMFromAttendanceLog(this AttendanceLog attendanceLog, string preSignedUrl, string thumbPreSignedUrl)
{
return new AttendanceLogVM
{
Id = attendanceLog.Id,
Comment = attendanceLog.Comment,
Employee = attendanceLog.Employee.ToBasicEmployeeVMFromEmployee(),
ActivityTime = attendanceLog.ActivityTime,
Activity = attendanceLog.Activity,
Photo = attendanceLog.Photo,
Latitude = attendanceLog.Latitude,
Longitude = attendanceLog.Longitude,
UpdatedOn = attendanceLog.UpdatedOn,
UpdatedByEmployee = attendanceLog.UpdatedByEmployee.ToBasicEmployeeVMFromEmployee(),
DocumentId = attendanceLog.Document.Id,
PreSignedUrl = preSignedUrl,
ThumbPreSignedUrl = thumbPreSignedUrl,
};
}
}
}