import 'package:json_annotation/json_annotation.dart';
import 'package:krow/core/data/models/staff/pivot.dart';

part 'staff_model.g.dart';

@JsonSerializable(fieldRename: FieldRename.snake)
class StaffModel {
  String? id;
  String? firstName;
  String? lastName;
  String? email;
  String? phone;
  String? avatar;
  Pivot? pivot;

  StaffModel({
    required this.id,
    required this.firstName,
    required this.lastName,
    required this.email,
    required this.phone,
    required this.avatar,
    required this.pivot,
  });

  factory StaffModel.fromJson(Map<String, dynamic> json) {
    return _$StaffModelFromJson(json);
  }

  Map<String, dynamic> toJson() => _$StaffModelToJson(this);
}
