import 'dart:collection';

import 'package:get/get.dart';
import 'package:vitalapp/architecture/defines.dart';
import 'package:vitalapp/database/entities/patient.dart';

class PatientSyncState {
  final RxInt _pageIndex = 1.obs;
  final RxInt _totalCount = 0.obs;
  final RxList<PatientEntity> _dataList = RxList<PatientEntity>();

  /// 当前页
  int get pageIndex => _pageIndex.value;
  set pageIndex(int val) => _pageIndex.updateValue(val);

  /// 数据总量
  int get totalCount => _totalCount.value;
  set totalCount(int val) => _totalCount.updateValue(val);

  /// 数据集
  UnmodifiableListView<PatientEntity> get dataList =>
      UnmodifiableListView<PatientEntity>(_dataList);
  set dataList(List<PatientEntity> val) => _dataList.value = val;
}
