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.
cloudsolutions-atoms/lib/modules/signup/models/group_model.dart

40 lines
800 B
Dart

import 'package:test_sa/models/base.dart';
4 weeks ago
class AssetGroup extends Base {
final int? id;
final String? code;
final String? displayName;
4 weeks ago
AssetGroup({
this.id,
this.code,
this.displayName,
4 weeks ago
}) : super(identifier: id?.toString(), name: displayName);
4 weeks ago
factory AssetGroup.fromJson(Map<String, dynamic> json) {
return AssetGroup(
id: json['id'],
code: json['code'],
4 weeks ago
displayName: json['name'],
);
}
Map<String, dynamic> toJson() {
return {
4 weeks ago
'id': id,
'code': code,
4 weeks ago
'name': displayName,
};
}
@override
bool operator ==(Object other) =>
identical(this, other) ||
4 weeks ago
other is AssetGroup &&
runtimeType == other.runtimeType &&
4 weeks ago
id == other.id;
@override
4 weeks ago
int get hashCode => id.hashCode;
}