import 'package:json_annotation/json_annotation.dart';
import 'package:krow/core/data/models/shift/event_shift_position_model.dart';
import 'package:krow/core/data/models/staff/staff_model.dart';
import 'package:krow/core/entity/staff_contact_entity.dart';
import 'package:krow/features/events/presentation/event_details/widgets/role/asigned_staff.dart';

part 'invoice_item_model.g.dart';

@JsonSerializable(fieldRename: FieldRename.snake)
class InvoiceItemModel {
  final String id;
  final StaffModel? staff;
  final EventShiftPositionModel? position;
  final double? workHours;
  final double? rate;
  final double? addonsAmount;
  final double? workAmount;
  final double? totalAmount;

  InvoiceItemModel(
      {required this.id,
      required this.staff,
      required this.position,
      required this.workHours,
      required this.rate,
      required this.addonsAmount,
      required this.workAmount,
      required this.totalAmount});

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

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