61 lines
2.0 KiB
Dart
61 lines
2.0 KiB
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'user_registration_model.freezed.dart';
|
|
part 'user_registration_model.g.dart';
|
|
|
|
@freezed
|
|
class UserRegistrationSheet with _$UserRegistrationSheet {
|
|
const factory UserRegistrationSheet({
|
|
required String name,
|
|
@JsonKey(name: 'first_name')
|
|
required String firstName,
|
|
@JsonKey(name: 'last')
|
|
required String lastName,
|
|
required String email,
|
|
required String password,
|
|
@JsonKey(name: 'password_confirmation')
|
|
required String passwordConfirmation,
|
|
@Default('accepted')
|
|
@JsonKey(name: 'terms')
|
|
String termsAccepted,
|
|
required String birthdate,
|
|
required String gender,
|
|
required String country,
|
|
required String city,
|
|
required String lang,
|
|
required String weight,
|
|
required String height,
|
|
@JsonKey(name: 'chest_circumference')
|
|
required String chestCircumference,
|
|
@JsonKey(name: 'waist_circumference')
|
|
required String waistCircumference,
|
|
@JsonKey(name: 'hip_circumference')
|
|
required String hipCircumference,
|
|
@JsonKey(name: 'blood_pressure_up')
|
|
required String bloodPressureUp,
|
|
@JsonKey(name: 'blood_pressure_down')
|
|
required String bloodPressureDown,
|
|
@JsonKey(name: 'has_hypo')
|
|
required String hasHypo,
|
|
@JsonKey(name: 'has_hyper')
|
|
required String hasHyper,
|
|
@JsonKey(name: 'about_alergy')
|
|
required String aboutAllergy,
|
|
@JsonKey(name: 'about_taking_pils')
|
|
required String aboutTakingPils,
|
|
@JsonKey(name: 'about_sport_hobbies')
|
|
required String aboutSportHobbies,
|
|
@JsonKey(name: 'favorite_foods')
|
|
required String favoriteFoods,
|
|
@JsonKey(name: 'unfavorite_foods')
|
|
required String unfavoriteFoods,
|
|
@JsonKey(name: 'additional_info')
|
|
required String additionalInfo,
|
|
@Default('1.2')
|
|
@JsonKey(name: 'activity_coefficient')
|
|
String activityCoefficient,
|
|
}) = _UserRegistrationSheet;
|
|
|
|
factory UserRegistrationSheet.fromJson(Map<String, Object?> json) => _$UserRegistrationSheetFromJson(json);
|
|
}
|