aslan-flutter/lib/chatvibe_domain/models/req/at_user_profile_cmd.dart
2026-07-01 18:25:58 +08:00

126 lines
3.4 KiB
Dart

/// id : 0
/// userNickname : "string"
/// userAvatar : "string"
/// userSex : 0
/// bornYear : 0
/// bornMonth : 0
/// bornDay : 0
/// age : 0
/// countryCode : "string"
/// countryId : 0
/// countryName : "string"
class ATUserProfileCmd {
ATUserProfileCmd({
num? id,
String? userNickname,
String? userAvatar,
num? userSex=0,
num? bornYear,
num? bornMonth,
num? bornDay,
num? age,
String? countryCode,
String? countryId,
String? countryName,}){
_id = id;
_userNickname = userNickname;
_userAvatar = userAvatar;
_userSex = userSex;
_bornYear = bornYear;
_bornMonth = bornMonth;
_bornDay = bornDay;
_age = age;
_countryCode = countryCode;
_countryId = countryId;
_countryName = countryName;
}
ATUserProfileCmd.fromJson(dynamic json) {
_id = json['id'];
_userNickname = json['userNickname'];
_userAvatar = json['userAvatar'];
_userSex = json['userSex'];
_bornYear = json['bornYear'];
_bornMonth = json['bornMonth'];
_bornDay = json['bornDay'];
_age = json['age'];
_countryCode = json['countryCode'];
_countryId = json['countryId'];
_countryName = json['countryName'];
}
num? _id;
String? _userNickname;
String? _userAvatar;
num? _userSex;
num? _bornYear;
num? _bornMonth;
num? _bornDay;
num? _age;
String? _countryCode;
String? _countryId;
String? _countryName;
ATUserProfileCmd copyWith({ num? id,
String? userNickname,
String? userAvatar,
num? userSex,
num? bornYear,
num? bornMonth,
num? bornDay,
num? age,
String? countryCode,
String? countryId,
String? countryName,
}) => ATUserProfileCmd( id: id ?? _id,
userNickname: userNickname ?? _userNickname,
userAvatar: userAvatar ?? _userAvatar,
userSex: userSex ?? _userSex,
bornYear: bornYear ?? _bornYear,
bornMonth: bornMonth ?? _bornMonth,
bornDay: bornDay ?? _bornDay,
age: age ?? _age,
countryCode: countryCode ?? _countryCode,
countryId: countryId ?? _countryId,
countryName: countryName ?? _countryName,
);
num? get id => _id;
String? get userNickname => _userNickname;
String? get userAvatar => _userAvatar;
num? get userSex => _userSex;
num? get bornYear => _bornYear;
num? get bornMonth => _bornMonth;
num? get bornDay => _bornDay;
num? get age => _age;
String? get countryCode => _countryCode;
String? get countryId => _countryId;
String? get countryName => _countryName;
set setUserAvatar(String value) => _userAvatar = value;
set setUserNickname(String value) => _userNickname = value;
set setUserSex(num value) => _userSex = value;
set setBornYear(num value) => _bornYear = value;
set setBornMonth(num value) => _bornMonth = value;
set setBornDay(num value) => _bornDay = value;
set setAge(num value) => _age = value;
set setCountryCode(String value) => _countryCode = value;
set setCountryId(String value) => _countryId = value;
set setCountryName(String value) => _countryName = value;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['userNickname'] = _userNickname;
map['userAvatar'] = _userAvatar;
map['userSex'] = _userSex;
map['bornYear'] = _bornYear;
map['bornMonth'] = _bornMonth;
map['bornDay'] = _bornDay;
map['age'] = _age;
map['countryCode'] = _countryCode;
map['countryId'] = _countryId;
map['countryName'] = _countryName;
return map;
}
}