// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'staking_pool_model.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

_$StakingPoolModelImpl _$$StakingPoolModelImplFromJson(
        Map<String, dynamic> json) =>
    _$StakingPoolModelImpl(
      id: json['id'] as String,
      name: json['name'] as String,
      description: json['description'] as String?,
      icon: json['icon'] as String?,
      symbol: json['symbol'] as String,
      apr: (json['apr'] as num).toDouble(),
      minStake: (json['minStake'] as num).toDouble(),
      maxStake: (json['maxStake'] as num?)?.toDouble(),
      lockPeriod: (json['lockPeriod'] as num).toInt(),
      availableToStake: (json['availableToStake'] as num).toDouble(),
      totalStaked: (json['totalStaked'] as num).toDouble(),
      status: json['status'] as String,
      poolType: json['poolType'] as String,
      isPromoted: json['isPromoted'] as bool? ?? false,
      autoCompound: json['autoCompound'] as bool? ?? false,
      maxPositionsPerUser: (json['maxPositionsPerUser'] as num?)?.toInt(),
      earlyWithdrawalPenalty:
          (json['earlyWithdrawalPenalty'] as num?)?.toDouble(),
      order: (json['order'] as num?)?.toInt() ?? 0,
      createdAt: json['createdAt'] == null
          ? null
          : DateTime.parse(json['createdAt'] as String),
      updatedAt: json['updatedAt'] == null
          ? null
          : DateTime.parse(json['updatedAt'] as String),
      totalValueLocked: (json['tvl'] as num?)?.toDouble(),
      totalUsers: (json['totalUsers'] as num?)?.toInt(),
      totalRewardsDistributed:
          (json['totalRewardsDistributed'] as num?)?.toDouble(),
      userStaked: (json['userStaked'] as num?)?.toDouble(),
      userPositionCount: (json['userPositionCount'] as num?)?.toInt(),
    );

Map<String, dynamic> _$$StakingPoolModelImplToJson(
        _$StakingPoolModelImpl instance) =>
    <String, dynamic>{
      'id': instance.id,
      'name': instance.name,
      'description': instance.description,
      'icon': instance.icon,
      'symbol': instance.symbol,
      'apr': instance.apr,
      'minStake': instance.minStake,
      'maxStake': instance.maxStake,
      'lockPeriod': instance.lockPeriod,
      'availableToStake': instance.availableToStake,
      'totalStaked': instance.totalStaked,
      'status': instance.status,
      'poolType': instance.poolType,
      'isPromoted': instance.isPromoted,
      'autoCompound': instance.autoCompound,
      'maxPositionsPerUser': instance.maxPositionsPerUser,
      'earlyWithdrawalPenalty': instance.earlyWithdrawalPenalty,
      'order': instance.order,
      'createdAt': instance.createdAt?.toIso8601String(),
      'updatedAt': instance.updatedAt?.toIso8601String(),
      'tvl': instance.totalValueLocked,
      'totalUsers': instance.totalUsers,
      'totalRewardsDistributed': instance.totalRewardsDistributed,
      'userStaked': instance.userStaked,
      'userPositionCount': instance.userPositionCount,
    };
