TSAIListHistoryBaseVM.swift 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //
  2. // TSAIListHistoryBaseVM.swift
  3. // AIEmoji
  4. //
  5. // Created by 100Years on 2025/4/9.
  6. //
  7. import Alamofire
  8. import ObjectMapper
  9. class TSAIListHistoryBaseVM {
  10. var generatorStyle:TSGeneratorImageStyle
  11. init(generatorStyle:TSGeneratorImageStyle) {
  12. self.generatorStyle = generatorStyle
  13. }
  14. func removeAllHistoryList(){
  15. switch generatorStyle {
  16. case .ageOld:
  17. TSChangeOldAgeHistory.shared.removeALLModel()
  18. case .ageChild:
  19. TSChangeBabyAgeHistory.shared.removeALLModel()
  20. case .oldPhoto:
  21. TSChangeOldPhotoHistory.shared.removeALLModel()
  22. case .eyeOpen:
  23. TSAIEyeOpenHistory.shared.removeALLModel()
  24. case .pretty:
  25. TSAIPhotoPrettyHistory.shared.removeALLModel()
  26. case .photoLive:
  27. TSAIPhotoLiveHistory.shared.removeALLModel()
  28. case .photoExpand:
  29. TSAIPhotoExpandHistory.shared.removeALLModel()
  30. }
  31. }
  32. }
  33. extension TSAIListHistoryBaseVM {
  34. var listModelArray:[TSActionInfoModel]{
  35. switch generatorStyle {
  36. case .ageOld:
  37. TSChangeOldAgeHistory.shared.listModels
  38. case .ageChild:
  39. TSChangeBabyAgeHistory.shared.listModels
  40. case .oldPhoto:
  41. TSChangeOldPhotoHistory.shared.listModels
  42. case .eyeOpen:
  43. TSAIEyeOpenHistory.shared.listModels
  44. case .pretty:
  45. TSAIPhotoPrettyHistory.shared.listModels
  46. case .photoLive:
  47. TSAIPhotoLiveHistory.shared.listModels
  48. case .photoExpand:
  49. TSAIPhotoExpandHistory.shared.listModels
  50. }
  51. }
  52. }