import 'package:domain/generated/json/base/json_convert_content.dart'; import 'package:domain/entity/response/staff_detail_entity.dart'; StaffDetailEntity $StaffDetailEntityFromJson(Map json) { final StaffDetailEntity staffDetailEntity = StaffDetailEntity(); final int? memberId = jsonConvert.convert(json['member_id']); if (memberId != null) { staffDetailEntity.memberId = memberId; } final String? name = jsonConvert.convert(json['name']); if (name != null) { staffDetailEntity.name = name; } final String? avatar = jsonConvert.convert(json['avatar']); if (avatar != null) { staffDetailEntity.avatar = avatar; } final String? sex = jsonConvert.convert(json['sex']); if (sex != null) { staffDetailEntity.sex = sex; } final String? dob = jsonConvert.convert(json['dob']); if (dob != null) { staffDetailEntity.dob = dob; } final String? nric = jsonConvert.convert(json['nric']); if (nric != null) { staffDetailEntity.nric = nric; } final String? mobile = jsonConvert.convert(json['mobile']); if (mobile != null) { staffDetailEntity.mobile = mobile; } final String? email = jsonConvert.convert(json['email']); if (email != null) { staffDetailEntity.email = email; } final String? address = jsonConvert.convert(json['address']); if (address != null) { staffDetailEntity.address = address; } final String? natl = jsonConvert.convert(json['natl']); if (natl != null) { staffDetailEntity.natl = natl; } final String? lang = jsonConvert.convert(json['lang']); if (lang != null) { staffDetailEntity.lang = lang; } final String? emerName = jsonConvert.convert(json['emer_name']); if (emerName != null) { staffDetailEntity.emerName = emerName; } final String? emerPhone = jsonConvert.convert(json['emer_phone']); if (emerPhone != null) { staffDetailEntity.emerPhone = emerPhone; } final int? remNum = jsonConvert.convert(json['rem_num']); if (remNum != null) { staffDetailEntity.remNum = remNum; } final double? remRate = jsonConvert.convert(json['rem_rate']); if (remRate != null) { staffDetailEntity.remRate = remRate; } return staffDetailEntity; } Map $StaffDetailEntityToJson(StaffDetailEntity entity) { final Map data = {}; data['member_id'] = entity.memberId; data['name'] = entity.name; data['avatar'] = entity.avatar; data['sex'] = entity.sex; data['dob'] = entity.dob; data['nric'] = entity.nric; data['mobile'] = entity.mobile; data['email'] = entity.email; data['address'] = entity.address; data['natl'] = entity.natl; data['lang'] = entity.lang; data['emer_name'] = entity.emerName; data['emer_phone'] = entity.emerPhone; data['rem_num'] = entity.remNum; data['rem_rate'] = entity.remRate; return data; } extension StaffDetailEntityExtension on StaffDetailEntity { StaffDetailEntity copyWith({ int? memberId, String? name, String? avatar, String? sex, String? dob, String? nric, String? mobile, String? email, String? address, String? natl, String? lang, String? emerName, String? emerPhone, int? remNum, double? remRate, }) { return StaffDetailEntity() ..memberId = memberId ?? this.memberId ..name = name ?? this.name ..avatar = avatar ?? this.avatar ..sex = sex ?? this.sex ..dob = dob ?? this.dob ..nric = nric ?? this.nric ..mobile = mobile ?? this.mobile ..email = email ?? this.email ..address = address ?? this.address ..natl = natl ?? this.natl ..lang = lang ?? this.lang ..emerName = emerName ?? this.emerName ..emerPhone = emerPhone ?? this.emerPhone ..remNum = remNum ?? this.remNum ..remRate = remRate ?? this.remRate; } }