import 'package:json_annotation/json_annotation.dart';
import 'package:krow/core/data/models/event/business_member_model.dart';
import 'package:krow/core/data/models/event/full_address_model.dart';
import 'package:krow/core/data/models/shift/event_shift_position_model.dart';

part 'shift_model.g.dart';

@JsonSerializable(fieldRename: FieldRename.snake)
class ShiftModel {
  final String id;
  final String name;
  final FullAddress fullAddress;
  final List<BusinessMemberModel>? contacts;
  final List<EventShiftPositionModel>? positions;

  ShiftModel({
    required this.id,
    required this.name,
    required this.fullAddress,
    required this.contacts,
    required this.positions,
  });

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

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