// 用户详细信息实体类 class UserData { final String id; final String nickName; final String? name; final String? profilePhoto; final String? identityCard; final int genderCode; final String genderValue; final String? homeCountryCode; final String? homeCountry; final int? provinceCode; final String? provinceName; final int? cityCode; final String? cityName; final int? districtCode; final String? districtName; final String? birthYear; final String? birthDate; final int? constellationCode; final String? constellation; final int? chineseZodiacCode; final String? chineseZodiac; final int? height; final int? weight; final int? educationCode; final String? education; final int? maritalStatusCode; final String? maritalStatusName; final int? minimumIncome; final int? maximumIncome; final int? incomeCode; final String? income; final String? describeInfo; final int? domicilePlaceProvinceCode; final String? domicilePlaceProvinceName; final int? domicilePlaceCityCode; final String? domicilePlaceCityName; final int? nationCode; final String? nation; final int? bodilyFormCode; final String? bodilyForm; final int? accountTypeCode; final String? accountTypeName; final int? nationalityCode; final String? nationality; final int? nativePlaceCode; final String? nativePlaceName; final int? industryCode; final String? industry; final int? occupationCode; final String? occupation; final int? onlyChild; final int? carPurchaseSituationCode; final String? carPurchaseSituation; final int? propertyPermitsCode; final String? propertyPermits; final int? hometownProvinceCode; final String? hometownProvinceName; final int? hometownCityCode; final String? hometownCityName; bool? realAuth; UserData({ required this.id, required this.nickName, this.name, this.profilePhoto, this.identityCard, required this.genderCode, required this.genderValue, this.homeCountryCode, this.homeCountry, this.provinceCode, this.provinceName, this.cityCode, this.cityName, this.districtCode, this.districtName, this.birthYear, this.birthDate, this.constellationCode, this.constellation, this.chineseZodiacCode, this.chineseZodiac, this.height, this.weight, this.educationCode, this.education, this.maritalStatusCode, this.maritalStatusName, this.minimumIncome, this.maximumIncome, this.incomeCode, this.income, this.describeInfo, this.domicilePlaceProvinceCode, this.domicilePlaceProvinceName, this.domicilePlaceCityCode, this.domicilePlaceCityName, this.nationCode, this.nation, this.bodilyFormCode, this.bodilyForm, this.accountTypeCode, this.accountTypeName, this.nationalityCode, this.nationality, this.nativePlaceCode, this.nativePlaceName, this.industryCode, this.industry, this.occupationCode, this.occupation, this.onlyChild, this.carPurchaseSituationCode, this.carPurchaseSituation, this.propertyPermitsCode, this.propertyPermits, this.hometownProvinceCode, this.hometownProvinceName, this.hometownCityCode, this.hometownCityName, this.realAuth, }); // 从JSON映射创建实例 factory UserData.fromJson(Map json) { return UserData( id: json['id'] ?? '', nickName: json['nickName'] ?? '', name: json['name'], profilePhoto: json['profilePhoto'], identityCard: json['identityCard'], genderCode: json['genderCode'] ?? 0, genderValue: json['genderValue'] ?? '', homeCountryCode: json['homeCountryCode'], homeCountry: json['homeCountry'], provinceCode: json['provinceCode'], provinceName: json['provinceName'], cityCode: json['cityCode'], cityName: json['cityName'], districtCode: json['districtCode'], districtName: json['districtName'], birthYear: json['birthYear'], birthDate: json['birthDate'], constellationCode: json['constellationCode'], constellation: json['constellation'], chineseZodiacCode: json['chineseZodiacCode'], chineseZodiac: json['chineseZodiac'], height: json['height'], weight: json['weight'], educationCode: json['educationCode'], education: json['education'], maritalStatusCode: json['maritalStatusCode'], maritalStatusName: json['maritalStatusName'], minimumIncome: json['minimumIncome'], maximumIncome: json['maximumIncome'], incomeCode: json['incomeCode'], income: json['income'], describeInfo: json['describeInfo'], domicilePlaceProvinceCode: json['domicilePlaceProvinceCode'], domicilePlaceProvinceName: json['domicilePlaceProvinceName'], domicilePlaceCityCode: json['domicilePlaceCityCode'], domicilePlaceCityName: json['domicilePlaceCityName'], nationCode: json['nationCode'], nation: json['nation'], bodilyFormCode: json['bodilyFormCode'], bodilyForm: json['bodilyForm'], accountTypeCode: json['accountTypeCode'], accountTypeName: json['accountTypeName'], nationalityCode: json['nationalityCode'], nationality: json['nationality'], nativePlaceCode: json['nativePlaceCode'], nativePlaceName: json['nativePlaceName'], industryCode: json['industryCode'], industry: json['industry'], occupationCode: json['occupationCode'], occupation: json['occupation'], onlyChild: json['onlyChild'], carPurchaseSituationCode: json['carPurchaseSituationCode'], carPurchaseSituation: json['carPurchaseSituation'], propertyPermitsCode: json['propertyPermitsCode'], propertyPermits: json['propertyPermits'], hometownProvinceCode: json['hometownProvinceCode'], hometownProvinceName: json['hometownProvinceName'], hometownCityCode: json['hometownCityCode'], hometownCityName: json['hometownCityName'], realAuth: json['realAuth'], ); } // 转换为JSON映射 Map toJson() { return { 'id': id, 'nickName': nickName, 'name': name, 'profilePhoto': profilePhoto, 'identityCard': identityCard, 'genderCode': genderCode, 'genderValue': genderValue, 'homeCountryCode': homeCountryCode, 'homeCountry': homeCountry, 'provinceCode': provinceCode, 'provinceName': provinceName, 'cityCode': cityCode, 'cityName': cityName, 'districtCode': districtCode, 'districtName': districtName, 'birthYear': birthYear, 'birthDate': birthDate, 'constellationCode': constellationCode, 'constellation': constellation, 'chineseZodiacCode': chineseZodiacCode, 'chineseZodiac': chineseZodiac, 'height': height, 'weight': weight, 'educationCode': educationCode, 'education': education, 'maritalStatusCode': maritalStatusCode, 'maritalStatusName': maritalStatusName, 'minimumIncome': minimumIncome, 'maximumIncome': maximumIncome, 'incomeCode': incomeCode, 'income': income, 'describeInfo': describeInfo, 'domicilePlaceProvinceCode': domicilePlaceProvinceCode, 'domicilePlaceProvinceName': domicilePlaceProvinceName, 'domicilePlaceCityCode': domicilePlaceCityCode, 'domicilePlaceCityName': domicilePlaceCityName, 'nationCode': nationCode, 'nation': nation, 'bodilyFormCode': bodilyFormCode, 'bodilyForm': bodilyForm, 'accountTypeCode': accountTypeCode, 'accountTypeName': accountTypeName, 'nationalityCode': nationalityCode, 'nationality': nationality, 'nativePlaceCode': nativePlaceCode, 'nativePlaceName': nativePlaceName, 'industryCode': industryCode, 'industry': industry, 'occupationCode': occupationCode, 'occupation': occupation, 'onlyChild': onlyChild, 'carPurchaseSituationCode': carPurchaseSituationCode, 'carPurchaseSituation': carPurchaseSituation, 'propertyPermitsCode': propertyPermitsCode, 'propertyPermits': propertyPermits, 'hometownProvinceCode': hometownProvinceCode, 'hometownProvinceName': hometownProvinceName, 'hometownCityCode': hometownCityCode, 'hometownCityName': hometownCityName, 'realAuth': realAuth, }; } @override String toString() { return 'UserData(id: $id, nickName: $nickName, genderCode: $genderCode, genderValue: $genderValue, birthYear: $birthYear)'; } }