24 lines
749 B
Dart
24 lines
749 B
Dart
// ignore_for_file: invalid_annotation_target
|
|
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'contact_person.freezed.dart';
|
|
part 'contact_person.g.dart';
|
|
|
|
@freezed
|
|
abstract class ContactPerson with _$ContactPerson {
|
|
const factory ContactPerson({
|
|
@JsonKey(name: 'first_name') required String? firstName,
|
|
@JsonKey(name: 'last_name') required String? lastName,
|
|
@JsonKey(name: 'full_name') required String? fullName,
|
|
required String? position,
|
|
required String? email,
|
|
required String? phone,
|
|
required String? mobile,
|
|
@JsonKey(name: 'is_primary') required bool? isPrimary,
|
|
}) = _ContactPerson;
|
|
|
|
factory ContactPerson.fromJson(Map<String, Object?> json) =>
|
|
_$ContactPersonFromJson(json);
|
|
}
|