import 'package:json_annotation/json_annotation.dart'; part 'absence_prefill_response.g.dart'; /// Prefill for the absence-report form: identity from LDAP plus the phone /// number from the user's last report (empty strings when unknown). @JsonSerializable() class AbsencePrefillResponse { @JsonKey(defaultValue: '') final String firstName; @JsonKey(defaultValue: '') final String lastName; @JsonKey(defaultValue: '') final String className; @JsonKey(defaultValue: '') final String phone; AbsencePrefillResponse({ required this.firstName, required this.lastName, required this.className, required this.phone, }); factory AbsencePrefillResponse.fromJson(Map json) => _$AbsencePrefillResponseFromJson(json); Map toJson() => _$AbsencePrefillResponseToJson(this); }