import 'package:queuedisplay/model/sampling_location_model.dart';

import '../app/constant.dart';
import 'base_repository.dart';

class SamplingLocationRepository extends BaseRepository {
  SamplingLocationRepository({required super.dio});
  Future<List<SamplingLocation>> getData() async {
    final url =
        "${Constant.baseUrl}mockup/fo/antrian/AntrianByStationAndLocation/getLocationName";
    final resp = await getService(service: url);

    final List<SamplingLocation> listLocation = List.empty(growable: true);

    // print(resp);

    resp['data']['records'].forEach((e) {
      final model = SamplingLocation.fromJson(e);
      listLocation.add(model);
    });
    return listLocation;
  }
}
