import 'package:json_annotation/json_annotation.dart';
import 'package:krow/features/shifts/data/models/business_skill.dart';
import 'package:krow/features/shifts/data/models/event_shift.dart';

part 'position.g.dart';

@JsonSerializable(fieldRename: FieldRename.snake)
class Position {
  String? id;
  String? startTime;
  String? endTime;
  Shift? shift;
  BusinessSkill? businessSkill;
  double? rate;
  @JsonKey(name: 'break')
  int? breakMinutes;

  Position({
    this.id,
    this.startTime,
    this.endTime,
    this.shift,
    this.businessSkill,
  });

  factory Position.fromJson(Map<String, dynamic> json) =>
      _$PositionFromJson(json);

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