Files
eatvio_app/lib/features/profile/models/weight_model.dart
2025-05-21 17:42:43 +03:00

20 lines
641 B
Dart

import 'package:freezed_annotation/freezed_annotation.dart';
part 'weight_model.freezed.dart';
part 'weight_model.g.dart';
@freezed
abstract class WeightModel with _$WeightModel {
const factory WeightModel({
@JsonKey(name: "id") required int id,
@JsonKey(name: "user_id") required int userId,
@JsonKey(name: "weight") required int weight,
@JsonKey(name: "created_at") required DateTime createdAt,
@JsonKey(name: "updated_at") required DateTime updatedAt,
@JsonKey(name: "bmi") required double bmi,
}) = _WeightModel;
factory WeightModel.fromJson(Map<String, dynamic> json) => _$WeightModelFromJson(json);
}