You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.3 KiB
Dart
52 lines
1.3 KiB
Dart
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;
|
|
}
|
|
}
|