import 'package:get/get.dart';
import 'package:vitalapp/managers/interfaces/models/patient_model_dto.dart';
import 'package:vitalapp/pages/controllers/paged_state_mixin.dart';

class PatientListState with PagedStateMixin<PatientModelDTO> {
  final _now = DateTime.now();

  // final RxList<PatientDTO> _dataList = RxList<PatientDTO>();

  // /// 列表数据集合
  // List<PatientDTO> get dataList => UnmodifiableListView(_dataList.toList());
  // set dataList(List<PatientDTO> val) => _dataList.value = val;

  final RxInt _currentTabIndex = RxInt(0);

  int get currentTabIndex => _currentTabIndex.value;
  set currentTabIndex(int val) => _currentTabIndex(val);

  late Rx<DateTime?> startTime =
      DateTime(_now.year - 1, _now.month, _now.day).obs; // >= 1年前00:00:00
  late Rx<DateTime?> endTime =
      DateTime(_now.year, _now.month, _now.day).obs; // < 第二天00:00:00
}
