Skip to content

Instantly share code, notes, and snippets.

@michzio
Created December 12, 2021 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michzio/aaf2db883b2d895adf94cdfed1f48606 to your computer and use it in GitHub Desktop.
Save michzio/aaf2db883b2d895adf94cdfed1f48606 to your computer and use it in GitHub Desktop.
SwiftUI MVVM architectures - Dao protocol
public protocol WordsetCategoryDaoProtocol {
// DaoProtocol
func insert(_ e: WordsetCategoryDTO) -> Future<WordsetCategory, Error>
func delete(_ e: WordsetCategoryDTO) -> Future<Int, Error>
func update(_ e: WordsetCategoryDTO) -> Future<WordsetCategory, Error>
func load(id: String) -> Future<WordsetCategory, Error>
// WordsetCategoryDaoProtocol
func update(_ entities: [WordsetCategoryDTO]) -> Future<UpdateResult, Error>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment