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

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