# response error atau success dan set message
type TransAbsensiResponse {
  status: String
  message: String
}

# check distance response
type TransAbsensiCheckDistanceResponse {
  status: String
  message: String
  selfie: String
  max_distance: String
  current_distance: String
  unit: String
}

# response waktu absen masuk dan pulang 
type TransAbsensiCheckTimeAttendanceResponse {
  status: String
  message: String
  jam_clock_in: String
  jam_clock_out: String
  is_absen_clock_in: String
  is_absen_clock_out: String
}

# query 
extend type Query {
  # untuk cek distance dengan fungsi distance_v2 di database
  queryCheckDistance(M_StaffID:String!, M_CompanyID:String!,CurrentLatitude:String!, CurrentLongitude:String!) : TransAbsensiCheckDistanceResponse!

  # untuk check waktu absen masuk dan pulang 
  queryCheckTimeAttendance(M_StaffID:String!, M_CompanyID:String!, token:String!) : TransAbsensiCheckTimeAttendanceResponse!
}

# mutation
extend type Mutation {
  # untuk clock in absensi (absensi masuk)
  mutationClockInAttendance(T_TransactionM_StaffID:String!, T_TransactionM_CompanyID:String!, T_TransactionCurrentLatitude:String!, T_TransactionCurrentLongitude:String!, T_TransactionCurrentDistance:String!, T_TransactionSelfiePhoto:String, token:String!, isSelfie:String!):TransAbsensiResponse!

  # untuk clock out absensi (absensi pulang)
  mutationClockOutAttendance(T_TransactionM_StaffID:String!, T_TransactionM_CompanyID:String!, T_TransactionCurrentLatitude:String!, T_TransactionCurrentLongitude:String!, T_TransactionCurrentDistance:String!, T_TransactionSelfiePhoto:String, token:String!, isSelfie:String!):TransAbsensiResponse!
} 