import 'package:hgdj/hj_utils/text_util.dart'; class ActressInfo { String? age; String? alias; String? birthday; String? bloodType; String? chineseName; int? collectCount; num? commentCount; String? cupSize; String? debutTime; String? englishName; num? galleryCount; String? gender; num? growCount; String? height; String? id; int? likeCount; String? name; String? portrait; String? region; String? score; List? seriesCover; String? summary; String? threeDimensions; int? type; // //1、女优 2、网黄 3、博主 4、声优 int? videoCount; String? weight; String? office; int? picsCount; int? dislikeCount; bool? hasLiked; bool? hasDisliked; bool? hasCollected; int? viewCount; bool? hasSubscribe; String get heightThreeDimen { if (threeDimensions?.isNotEmpty == true && height?.isNotEmpty == true) { return "身高三围: T$height $threeDimensions"; } if (height?.isNotEmpty == true) { return "身高: T$height"; } if (threeDimensions?.isNotEmpty == true) { return "三围: $threeDimensions"; } return ""; } ActressInfo(); int get workCount { return (videoCount ?? 0) + (picsCount ?? 0); } String get actressName { return name ?? ''; } ActressInfo.fromJson(dynamic json) { age = json['age']; alias = json['alias']; birthday = json['birthday']; bloodType = json['bloodType']; chineseName = json['chineseName']; collectCount = json['collectCount']; commentCount = json['commentCount']; cupSize = json['cupSize'].toString(); debutTime = json['debutTime']; englishName = json['englishName']; galleryCount = json['galleryCount']; gender = json['gender']; growCount = json['growCount']; height = json['height']; id = json['id']; likeCount = json['likeCount']; name = json['name']; portrait = json['portrait']; region = json['region']; score = json['score']; seriesCover = parseStringList(json['seriesCover']); summary = json['summary']; threeDimensions = json['threeDimensions']; type = json['type']; weight = json['weight']; videoCount = json['videoCount']; office = json['office']; picsCount = json['picsCount']; dislikeCount = json['dislikeCount']; hasLiked = json['hasLiked']; hasDisliked = json['hasDisliked']; hasCollected = json['hasCollected']; viewCount = json['viewCount']; hasSubscribe = json['hasSubscribe']; } Map toJson() { final map = {}; map['age'] = age; map['alias'] = alias; map['birthday'] = birthday; map['bloodType'] = bloodType; map['chineseName'] = chineseName; map['collectCount'] = collectCount; map['commentCount'] = commentCount; map['cupSize'] = cupSize.toString(); map['debutTime'] = debutTime; map['englishName'] = englishName; map['galleryCount'] = galleryCount; map['gender'] = gender; map['growCount'] = growCount; map['height'] = height; map['id'] = id; map['likeCount'] = likeCount; map['name'] = name; map['portrait'] = portrait; map['region'] = region; map['score'] = score; map['seriesCover'] = seriesCover; map['summary'] = summary; map['threeDimensions'] = threeDimensions; map['type'] = type; map['videoCount'] = videoCount; map['weight'] = weight; map['office'] = office; return map; } }