mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-24 20:12:27 +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: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 {
|
||||
const ReorderSpacesParam({
|
||||
required this.spaces,
|
||||
required this.communityUuid,
|
||||
required this.parentSpaceUuid,
|
||||
this.parentSpaceUuid,
|
||||
});
|
||||
|
||||
final List<SpaceModel> spaces;
|
||||
final String communityUuid;
|
||||
final String parentSpaceUuid;
|
||||
final String? parentSpaceUuid;
|
||||
|
||||
@override
|
||||
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