// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'user_model.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

UserModel _$UserModelFromJson(Map<String, dynamic> json) => UserModel(
  serverId: json['id'] as String,
  tenant: TenantModel.fromJson(json['tenant'] as Map<String, dynamic>),
  outletId: json['outlet_id'] as String,
  rawOutlets: json['outlets'],
  staffs:
      (json['staff_list'] as List<dynamic>?)
          ?.map((e) => StaffModel.fromJson(e as Map<String, dynamic>))
          .toList() ??
      [],
  name: json['name'] as String,
  email: json['email'] as String?,
  phoneNumber: json['phone_number'] as String?,
  role: json['role'] as String,
  placeOfBirth: json['place_of_birth'] as String?,
  dateOfBirth: json['date_of_birth'] as String?,
  shiftName: json['shift_name'] as String?,
  shiftStartTime: json['shift_start_time'] as String?,
  shiftEndTime: json['shift_end_time'] as String?,
  isActive: json['is_active'] as bool,
  createdAt: DateTime.parse(json['created_at'] as String),
  updatedAt: DateTime.parse(json['updated_at'] as String),
);

Map<String, dynamic> _$UserModelToJson(UserModel instance) => <String, dynamic>{
  'id': instance.serverId,
  'tenant': instance.tenant,
  'outlet_id': instance.outletId,
  'outlets': instance.rawOutlets,
  'staff_list': instance.staffs,
  'name': instance.name,
  'email': instance.email,
  'phone_number': instance.phoneNumber,
  'role': instance.role,
  'place_of_birth': instance.placeOfBirth,
  'date_of_birth': instance.dateOfBirth,
  'shift_name': instance.shiftName,
  'shift_start_time': instance.shiftStartTime,
  'shift_end_time': instance.shiftEndTime,
  'is_active': instance.isActive,
  'created_at': instance.createdAt.toIso8601String(),
  'updated_at': instance.updatedAt.toIso8601String(),
};
