/// YApi QuickType插件生成，具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation

import 'dart:convert';

import 'package:widgets/load_state_layout.dart';

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

  int? page;
  int? limit = 10;
  int? count = 1;
  List<Map<String, dynamic>>? list;

  RewardsMyExpiredState({
    this.loadingState = LoadState.State_Loading,
    String? errorMessage,
    this.page = 1,
    this.limit = 10,
    this.count = 1,
    required this.list,
  });

  RewardsMyExpiredState copyWith({
    LoadState? loadingState,
    String? errorMessage,
    int? page,
    int? limit,
    int? count,
    List<Map<String, dynamic>>? list,
  }) {
    return RewardsMyExpiredState(
      loadingState: loadingState ?? this.loadingState,
      errorMessage: errorMessage ?? this.errorMessage,
      page: page ?? this.page,
      limit: limit ?? this.limit,
      count: count ?? this.count,
      list: list ?? this.list,
    );
  }

  Map<String, dynamic> toMap() {
    return {
      'page': this.page,
      'limit': this.limit,
      'count': this.count,
      'list': this.list,
    };
  }

  factory RewardsMyExpiredState.fromMap(Map<String, dynamic> map) {
    return RewardsMyExpiredState(
      page: map['page'] as int,
      limit: map['limit'] as int,
      count: map['count'] as int,
      list: map['list'] as List<Map<String, dynamic>>,
    );
  }
}
