You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
737 B

3 years ago
import 'package:equatable/equatable.dart';
import 'package:hive_flutter/adapters.dart';
3 years ago
import 'package:json_annotation/json_annotation.dart';
part 'community_model.g.dart';
@JsonSerializable()
@HiveType(typeId: 7)
3 years ago
class CommunityModel extends Equatable {
@HiveField(0)
3 years ago
final int id;
@HiveField(1)
3 years ago
final String name;
@HiveField(2)
3 years ago
final String address;
@HiveField(3)
3 years ago
final String addressDetails;
3 years ago
3 years ago
factory CommunityModel.fromJson(Map<String, dynamic> json) =>
_$CommunityModelFromJson(json);
const CommunityModel({
required this.id,
required this.name,
required this.address,
required this.addressDetails,
});
3 years ago
@override
List<Object?> get props => [id, name, address, addressDetails];
3 years ago
}