Merge branch 'refs/heads/design_3.0_asset_inventory_module' into design_3.0_traf_module
# Conflicts: # lib/controllers/api_routes/urls.dart # lib/controllers/providers/api/all_requests_provider.dart # lib/controllers/providers/api/user_provider.dart # lib/new_views/pages/land_page/create_request-type_bottomsheet.dart # lib/new_views/pages/land_page/my_request/all_requests_filter_page.dart # lib/new_views/pages/land_page/my_request/my_requests_page.dartdesign_3.0_asset_inventory_module
commit
f4d47244be
@ -0,0 +1,51 @@
|
||||
class ModulesPermissionsModel {
|
||||
bool? canAdd;
|
||||
bool? canEdit;
|
||||
bool? canView;
|
||||
bool? canDelete;
|
||||
Module? module;
|
||||
|
||||
ModulesPermissionsModel({this.canAdd, this.canEdit, this.canView, this.canDelete, this.module});
|
||||
|
||||
ModulesPermissionsModel.fromJson(Map<String, dynamic> json) {
|
||||
canAdd = json['canAdd'];
|
||||
canEdit = json['canEdit'];
|
||||
canView = json['canView'];
|
||||
canDelete = json['canDelete'];
|
||||
module = json['module'] != null ? new Module.fromJson(json['module']) : null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['canAdd'] = this.canAdd;
|
||||
data['canEdit'] = this.canEdit;
|
||||
data['canView'] = this.canView;
|
||||
data['canDelete'] = this.canDelete;
|
||||
if (this.module != null) {
|
||||
data['module'] = this.module!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Module {
|
||||
int? id;
|
||||
String? name;
|
||||
int? value;
|
||||
|
||||
Module({this.id, this.name, this.value});
|
||||
|
||||
Module.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
value = json['value'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['value'] = this.value;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue