JXMemberModel.dart 836 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. 用户信息模型
  3. * */
  4. import 'JXServiceModel.dart';
  5. class JXMemberModel {
  6. int id = -1;
  7. /*姓名*/
  8. String name = '';
  9. /*电话*/
  10. String tel = '';
  11. /*生日信息*/
  12. String birth = '';
  13. /*地址*/
  14. String prov = '';
  15. String city = '';
  16. String area = '';
  17. String addr = '';
  18. /*其他*/
  19. String remark = '';
  20. /*服务*/
  21. List <JXServiceModel> services = [];
  22. Map<String, dynamic> toMap() {
  23. return {
  24. 'name': name,
  25. 'tel': tel,
  26. 'birth': birth,
  27. 'prov': prov,
  28. 'city': city,
  29. 'area': area,
  30. 'addr': addr,
  31. 'remark': remark,
  32. };
  33. }
  34. /*获取显示tips*/
  35. String theFirstTipsDes() {
  36. if (this.services.length > 0) {
  37. JXServiceModel ser = this.services[0];
  38. return '${ser.kind} ${ser.remark}';
  39. } else {
  40. return '无任务';
  41. }
  42. }
  43. }