import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; part 'life_pay_model.g.dart'; @JsonSerializable(createToJson: true, explicitToJson: true) class LifePayModel extends Equatable { final int id; final String? chargesName; final String billDateStart; final String billDateEnd; final String createDate; final double payPrincipal; final double defaultAmount; factory LifePayModel.fromJson(Map json) => _$LifePayModelFromJson(json); Map toJson() => _$LifePayModelToJson(this); @override List get props => [ id, chargesName, billDateStart, billDateEnd, createDate, payPrincipal, defaultAmount ]; const LifePayModel({ required this.id, this.chargesName, required this.billDateStart, required this.billDateEnd, required this.createDate, required this.payPrincipal, required this.defaultAmount, }); }