forked from eatvio/eatvio_app
25 lines
1014 B
Dart
25 lines
1014 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'registration_model.freezed.dart';
|
|
part 'registration_model.g.dart';
|
|
|
|
@freezed
|
|
abstract class RegistrationModel with _$RegistrationModel {
|
|
|
|
factory RegistrationModel({
|
|
@JsonKey(name: 'first_name') required String firstName,
|
|
@JsonKey(name: 'last_name') required String lastName,
|
|
@JsonKey(name: 'email') required String email,
|
|
@JsonKey(name: 'phone') required String phone,
|
|
@JsonKey(name: 'gender') required String gender,
|
|
@JsonKey(name: 'password') required String password,
|
|
@JsonKey(name: 'password_confirmation') required String confirmPassword,
|
|
@JsonKey(name: 'weight') required int weight,
|
|
@JsonKey(name: 'height') required int height,
|
|
@JsonKey(name: 'activity_coefficient') required double activityCoefficient,
|
|
@JsonKey(name: 'birthdate') required String birthday,
|
|
}) = _RegistrationModel;
|
|
|
|
factory RegistrationModel.fromJson(Map<String, dynamic> json) => _$RegistrationModelFromJson(json);
|
|
}
|