package com.taf.attendance.data import com.taf.attendance.model.AttendanceRecord import retrofit2.http.Body import retrofit2.http.GET import retrofit2.http.POST interface ApiService { @POST("users/login") suspend fun login(@Body creds: Map): LoginResponse @POST("timeclocks") suspend fun logTime(@Body data: ClockPayload): ApiStatus @GET("timeclocks/recent") suspend fun recentClocks(): List @GET("salary/payslips") suspend fun myPayslips(): List @GET("salary/payslips/html/{id}") suspend fun payslipHtml(@retrofit2.http.Path("id") id: String): okhttp3.ResponseBody } data class LocationDto( val lat: Double, val lng: Double, val radius: Int? ) data class UserDto( val id: Int ) data class LoginResponse( val token: String, val locations: List?, val user: UserDto ) data class ApiStatus(val status: String) data class TimeClockDto( val clock_type: String, val clocked_at: String, val lat: Double?, val lng: Double? ) data class PayslipDto( val id: String, // Changed from Int to String for UUID val run_date: String?, val gross_pay: Double, val net_pay: Double, val user_id: String, val org_id: String, val time_clock_aggregate_id: String, val user_name: String?, val org_name: String?, val start_date: String?, val end_date: String?, val deductions: List ) data class DeductionDto( val name: String, val amount: Double )