timestampDbStore function

StoreRef<int, Map<String, Object?>> timestampDbStore(
  1. ObjectWeebiOffline objectType
)

Implementation

StoreRef<int, Map<String, Object?>> timestampDbStore(
    ObjectWeebiOffline objectType) {
  switch (objectType) {
    case ObjectWeebiOffline.articleCalibre:
      return intMapStoreFactory.store('timestamp_article');

    /// exception for articles photos
    /// we do not want to pull all photos every time
    /// so we pass the article photos last sync timestamp
    case ObjectWeebiOffline.articlePhoto:
      return intMapStoreFactory.store('timestamp_article_photo');

    //
    case ObjectWeebiOffline.boutique:
      return intMapStoreFactory.store('timestamp_boutique');
    case ObjectWeebiOffline.contact:
      return intMapStoreFactory.store('timestamp_contact');
    case ObjectWeebiOffline.ticket:
      return intMapStoreFactory.store('timestamp_ticket');
    default:
      throw 'unknown ObjectType';
  }
}