deployPlatform.m.dart 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import 'liveConsultation.m.dart';
  2. class DeployPlatServerInfoDTO extends BaseDTO{
  3. String? id;
  4. String? serverID;
  5. String? name;
  6. bool isMaster;
  7. String? masterServerId;
  8. String? remoteAccountId;
  9. String? remotePassword;
  10. DeployPlatServerInfoDTO({
  11. this.id,
  12. this.serverID,
  13. this.name,
  14. this.isMaster = false,
  15. this.masterServerId,
  16. this.remoteAccountId,
  17. this.remotePassword,
  18. DateTime? createTime,
  19. DateTime? updateTime,
  20. }) : super(
  21. createTime: createTime,
  22. updateTime: updateTime,
  23. );
  24. factory DeployPlatServerInfoDTO.fromJson(Map<String, dynamic> map) {
  25. return DeployPlatServerInfoDTO(
  26. id: map['Id'],
  27. serverID: map['ServerID'],
  28. name: map['Name'],
  29. isMaster: map['IsMaster'],
  30. masterServerId: map['MasterServerId'],
  31. remoteAccountId: map['RemoteAccountId'],
  32. remotePassword: map['RemotePassword'],
  33. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  34. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  35. );
  36. }
  37. Map<String, dynamic> toJson() {
  38. final map = super.toJson();
  39. if(id != null)
  40. map['Id'] = id;
  41. if(serverID != null)
  42. map['ServerID'] = serverID;
  43. if(name != null)
  44. map['Name'] = name;
  45. map['IsMaster'] = isMaster;
  46. if(masterServerId != null)
  47. map['MasterServerId'] = masterServerId;
  48. if(remoteAccountId != null)
  49. map['RemoteAccountId'] = remoteAccountId;
  50. if(remotePassword != null)
  51. map['RemotePassword'] = remotePassword;
  52. return map;
  53. }
  54. }