frontAuthorityGroups.m.dart 976 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. class FrontAuthorityGroupInfo {
  2. String? frontGroupCode;
  3. String? description;
  4. List<String>? adminCodes;
  5. List<String>? features;
  6. bool isShow;
  7. FrontAuthorityGroupInfo({
  8. this.frontGroupCode,
  9. this.description,
  10. this.adminCodes,
  11. this.features,
  12. this.isShow=false,
  13. });
  14. factory FrontAuthorityGroupInfo.fromJson(Map<String, dynamic> map) {
  15. return FrontAuthorityGroupInfo(
  16. frontGroupCode: map['FrontGroupCode'],
  17. description: map['Description'],
  18. adminCodes: map['AdminCodes'].cast<String>().toList(),
  19. features: map['Features'].cast<String>().toList(),
  20. isShow: map['IsShow'],
  21. );
  22. }
  23. Map<String, dynamic> toJson() {
  24. final map = Map<String, dynamic>();
  25. if(frontGroupCode != null)
  26. map['FrontGroupCode'] = frontGroupCode;
  27. if(description != null)
  28. map['Description'] = description;
  29. if(adminCodes != null)
  30. map['AdminCodes'] = adminCodes;
  31. if(features != null)
  32. map['Features'] = features;
  33. map['IsShow'] = isShow;
  34. return map;
  35. }
  36. }