completed migrating data scope from user to workspace
This commit is contained in:
47
lib/screens/workspaces/workspace_model.dart
Normal file
47
lib/screens/workspaces/workspace_model.dart
Normal file
@@ -0,0 +1,47 @@
|
||||
class WorkspaceModel {
|
||||
final String id;
|
||||
final String createdAt;
|
||||
final String updatedAt;
|
||||
final bool deleted;
|
||||
final String name;
|
||||
final String description;
|
||||
final String phone;
|
||||
final String email;
|
||||
|
||||
WorkspaceModel({
|
||||
required this.id,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.deleted,
|
||||
required this.name,
|
||||
required this.description,
|
||||
required this.phone,
|
||||
required this.email,
|
||||
});
|
||||
|
||||
factory WorkspaceModel.fromJson(Map<String, dynamic> json) {
|
||||
return WorkspaceModel(
|
||||
id: json['id'] as String,
|
||||
createdAt: json['createdAt'] as String,
|
||||
updatedAt: json['updatedAt'] as String,
|
||||
deleted: json['deleted'] as bool,
|
||||
name: json['name'] as String,
|
||||
description: json['description'] as String,
|
||||
phone: json['phone'] as String,
|
||||
email: json['email'] as String,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'id': id,
|
||||
'createdAt': createdAt,
|
||||
'updatedAt': updatedAt,
|
||||
'deleted': deleted,
|
||||
'name': name,
|
||||
'description': description,
|
||||
'phone': phone,
|
||||
'email': email,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user