import 'package:domain/entity/facility_index_entity.dart';
import 'package:domain/entity/id_name_entity.dart';
import 'package:widgets/load_state_layout.dart';

class FacilityBookState {

  //页面 LoadView 状态的展示
  LoadState loadingState;
  String? errorMessage;

  List<FacilityIndexEntity> datas; //页面列表数据

  // ===================================  Begin  ↓  ===================================

  FacilityBookState({
    this.loadingState = LoadState.State_Loading,
    this.errorMessage,
    required this.datas,
  });

  FacilityBookState copyWith({
    LoadState? loadingState,
    String? errorMessage,
    bool? needShowPlaceholder,
    List<FacilityIndexEntity>? datas,
  }) {
    return FacilityBookState(
      errorMessage: errorMessage ?? this.errorMessage,
      loadingState: loadingState ?? this.loadingState,
      datas: datas ?? this.datas,
    );
  }
}
