import 'package:json_annotation/json_annotation.dart'; part 'session.g.dart'; @JsonSerializable() class SaTokenInfo { String? tokenName; String? tokenValue; bool? isLogin; dynamic loginId; String? loginType; int? tokenTimeout; int? sessionTimeout; int? tokenSessionTimeout; int? tokenActiveTimeout; String? loginDeviceType; String? tag; SaTokenInfo({ this.tokenName, this.tokenValue, this.isLogin, this.loginId, this.loginType, this.tokenTimeout, this.sessionTimeout, this.tokenSessionTimeout, this.tokenActiveTimeout, this.loginDeviceType, this.tag, }); factory SaTokenInfo.fromJson(Map json) => _$SaTokenInfoFromJson(json); Map toJson() => _$SaTokenInfoToJson(this); } @JsonSerializable() class User { String? username; int? gender; String? phoneNumber; String? email; DateTime? birthDate; String? avatar; List? area; String? address; String? job; List? tags; String? description; String? id; User({ this.id, this.username, this.gender, this.phoneNumber, this.email, this.birthDate, this.avatar, this.area, this.address, this.job, this.tags, this.description, }); factory User.fromJson(Map json) => _$UserFromJson(json); Map toJson() => _$UserToJson(this); } @JsonSerializable() class Session { SaTokenInfo? saToken; User? userInfo; Session({this.saToken, this.userInfo}); factory Session.fromJson(Map json) => _$SessionFromJson(json); Map toJson() => _$SessionToJson(this); }