Working api call to backend
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import '../global/utils.dart';
|
||||
|
||||
part 'budget.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Budget {
|
||||
const Budget({
|
||||
this.id,
|
||||
required this.name,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final String name;
|
||||
|
||||
@JsonKey(fromJson: dateFromJson, toJson: dateToJson)
|
||||
final DateTime createdAt;
|
||||
@JsonKey(fromJson: dateFromJson, toJson: dateToJson)
|
||||
final DateTime updatedAt;
|
||||
|
||||
factory Budget.fromJson(Map<String, dynamic> json) => _$BudgetFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$BudgetToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user