123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- class SessionInfo {
- String? userCode;
- String? deviceId;
- String? sessionId;
- String? id;
- DateTime? createTime;
- DateTime? updateTime;
- bool isDelete;
- SessionInfo({
- this.userCode,
- this.deviceId,
- this.sessionId,
- this.id,
- this.createTime,
- this.updateTime,
- this.isDelete=false,
- });
- factory SessionInfo.fromJson(Map<String, dynamic> map) {
- return SessionInfo(
- userCode: map['UserCode'],
- deviceId: map['DeviceId'],
- sessionId: map['SessionId'],
- id: map['Id'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- isDelete: map['IsDelete'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(userCode != null)
- map['UserCode'] = userCode;
- if(deviceId != null)
- map['DeviceId'] = deviceId;
- if(sessionId != null)
- map['SessionId'] = sessionId;
- if(id != null)
- map['Id'] = id;
- if(createTime != null)
- map['CreateTime'] = createTime;
- if(updateTime != null)
- map['UpdateTime'] = updateTime;
- map['IsDelete'] = isDelete;
- return map;
- }
- }
- class SessionClientInfo {
- String? clientIpAndPort;
- String? clientDeviceId;
- String? clientSource;
- String? clientExtensionInfo;
- SessionClientInfo({
- this.clientIpAndPort,
- this.clientDeviceId,
- this.clientSource,
- this.clientExtensionInfo,
- });
- factory SessionClientInfo.fromJson(Map<String, dynamic> map) {
- return SessionClientInfo(
- clientIpAndPort: map['ClientIpAndPort'],
- clientDeviceId: map['ClientDeviceId'],
- clientSource: map['ClientSource'],
- clientExtensionInfo: map['ClientExtensionInfo'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(clientIpAndPort != null)
- map['ClientIpAndPort'] = clientIpAndPort;
- if(clientDeviceId != null)
- map['ClientDeviceId'] = clientDeviceId;
- if(clientSource != null)
- map['ClientSource'] = clientSource;
- if(clientExtensionInfo != null)
- map['ClientExtensionInfo'] = clientExtensionInfo;
- return map;
- }
- }
|