mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 04:22:28 +00:00
Update ReorderSpacesParam to make parentSpaceUuid optional and add toJson method for serialization.
This commit is contained in:
@ -1,17 +1,21 @@
|
|||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:syncrow_web/pages/spaces_management/all_spaces/model/space_model.dart';
|
import 'package:syncrow_web/pages/space_management_v2/modules/communities/domain/models/space_model.dart';
|
||||||
|
|
||||||
class ReorderSpacesParam extends Equatable {
|
class ReorderSpacesParam extends Equatable {
|
||||||
const ReorderSpacesParam({
|
const ReorderSpacesParam({
|
||||||
required this.spaces,
|
required this.spaces,
|
||||||
required this.communityUuid,
|
required this.communityUuid,
|
||||||
required this.parentSpaceUuid,
|
this.parentSpaceUuid,
|
||||||
});
|
});
|
||||||
|
|
||||||
final List<SpaceModel> spaces;
|
final List<SpaceModel> spaces;
|
||||||
final String communityUuid;
|
final String communityUuid;
|
||||||
final String parentSpaceUuid;
|
final String? parentSpaceUuid;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<Object?> get props => [spaces, communityUuid, parentSpaceUuid];
|
List<Object?> get props => [spaces, communityUuid, parentSpaceUuid];
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
'spacesUuids': spaces.map((space) => space.uuid).toList(),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user