import 'package:json_annotation/json_annotation.dart';
import 'package:krow/core/data/models/shift/business_skill_model.dart';
import 'package:krow/core/data/models/shift/department_model.dart';
import 'package:krow/core/data/models/staff/staff_model.dart';

part 'event_shift_position_model.g.dart';

@JsonSerializable(fieldRename: FieldRename.snake)
class EventShiftPositionModel {
  final String id;

  final int count;
  final String startTime;
  final String endTime;
  final double rate;
  @JsonKey(name: 'break')
  final int breakTime;
  final BusinessSkillModel businessSkill;
  final List<StaffModel>? staff;
  final DepartmentModel? department;

  EventShiftPositionModel({
    required this.id,
    required this.count,
    required this.startTime,
    required this.endTime,
    required this.rate,
    required this.breakTime,
    required this.businessSkill,
    required this.staff,
    required this.department,
  });

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

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